Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can any DB2 guru help? Configuring AppServer to use DB2

843833Mar 22 2004 — edited Mar 30 2004
Eventually, I need my EJB example to shuffle data between Oracle and DB2
databases.
I am currently trying to adapt my BMP entity (works with Oracle) to run with DB2
(personal edition). Have run into two problems.
1) Configuring the connection pool (via admin tool)
I've got:
- db2jcc.jar and db2jcc_license_cu.jar added into AppServer's classpath
-connection pool with com.ibm.db2.jcc.DB2SimpleDataSource as a javax.sql.DataSource
- validation as auto-commit; isolation as default for JDBC driver
- properties: name=moi password=pwd dataBaseName=mine driverType=4
portNumber=50000 serverName="mybox.here.com"
Attempt to "ping" this datasource fails "Error getting connection from EIS"; server log
has error in some helper function called from
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:171)
SqlException:userid length 0 is not allowed;
I've tried adding userid as an extra property (same as name) but that made no difference;
What else do I need to set in order to connect to DB2?

2) My eventual application will need transactions and so XADataSources; when
I was trying to set up connection I did try DB2XADataSource as a javax.sql.XADataSource.
But then i got an error that basically stated "type 4 driver not licensed for XA".
Is this some limitation of personal edition DB2?
How does one configure a DB2 XADataSource?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2004
Added on Mar 22 2004
2 comments
264 views