users@glassfish.java.net

RE: EAR deployment problem for XA Datasource for DB2 using Type 4 driver

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Thu, 5 Mar 2009 09:23:48 -0500

/****start of IBM Doc for configuring DB2 XA Data Source*****/

http://www.ibm.com/developerworks/websphere/library/techarticles/0407_woolf/0407_woolf.html

Configure a DB2 XA data source


This example also includes a DB2 XA data source. The configuration
settings for a DB2 data source are very similar to those for an Oracle
data source.


First, define a JAAS identity capable of logging into your database. In this example, we've set up one named DB2.
 

DB2 JAAS authentication entry settings

Property nameProperty ValueDefault?AliasDB2
User IDdb2
Passworda_password


Second, we need to create a JDBC provider for DB2 XA data sources.


DB2 JDBC provider settings

Property NameProperty ValueDefault?JDBC Provider typeDB2 Universal JDBC Driver Provider (XA)
Name
DB2 Universal JDBC Driver Provider (XA)
Implementation class namecom.ibm.db2.jcc.DB2XADataSourcedefaultClass path
  ${DB2UNIVERSAL_JDBC_DRIVER_PATH}}/db2jcc.jar

  ${UNIVERSAL_JDBC_DRIVER_PATH}}/db2jcc_license_cu.jar

  ${DB2UNIVERSAL_JDBC_DRIVER_PATH}}/db2jcc_license_cisuz.jar

  default

Third, we need to create a DB2 XA data source with the JNDI name jdbc/DB2XADS. We'll use the JAAS identity from
step 1. Whereas an Oracle data source needs a URL string for accessing the database, a DB2 data source
just needs the name of the database, in this case, "sample."


DB2 JDBC data source settings

Property NameProperty ValueDefault?JDBC Provider typeDB2 Universal JDBC Driver Provider (XA), version 5.0
NameExample DB2 XA Data Source
JNDI namejdbc/DB2XADS
Helper classcom.ibm.websphere.rsadapter.DB2UniversalDataStoreHelperdefaultAuthentication aliasDB2
databaseNamesample


Fourth, we need to specify the path where the DB2 drivers are installed, which is the directory that contains the db2jcc.jar
file. Also, verify the default value of the other variable in the data source's class path.


DB2 defined variables (for nodes) settings

Property NameProperty ValueDefault?DB2UNIVERSAL_JDBC_DRIVER_PATHC:\db2\SQLLIB\java
UNIVERSAL_JDBC_DRIVER_PATH${WAS_INSTALL_ROOT}/universalDriver/libdefault

You have now configured a DB2 XA data source registered as jdbc/DB2XADS. Save the server configuration.
/********end doc********/
http://www.ibm.com/developerworks/websphere/library/techarticles/0407_woolf/0407_woolf.html


HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.




> Date: Thu, 5 Mar 2009 04:28:18 -0800
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Re: RE: EAR deployment problem for XA Datasource for DB2 using Type 4 driver
>
> I did't use Net Beans.I generated the EAR through build script using ANT and then tried to deploy though admin console.
> [Message sent by forum member 'satyaranjan2006' (satyaranjan2006)]
>
> http://forums.java.net/jive/thread.jspa?messageID=335260
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Windows Live™: Life without walls.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009