jQuery in Action, 3rd edition
The moose likes JBoss/WildFly and the fly likes Connection Pooling in JBoss v5.0 with IBM DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Connection Pooling in JBoss v5.0 with IBM DB2" Watch "Connection Pooling in JBoss v5.0 with IBM DB2" New topic

Connection Pooling in JBoss v5.0 with IBM DB2

damodaran puliyassery

Joined: Dec 17, 2009
Posts: 13
I modify the db2-ds.xml file and put it in server/default/deploy folder.The file is

And in J2EE i write this code

But i got this error Message:- Error in DBConnection test not bound
I have to do any more changes?Why this error??Somebody please help......

thanks in advance....
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

By default the datasource will bind to java: namespace. So use java:test as the jndi name during the lookup. And remember that the java: namespace is visible only to clients running in the same JVM as the server where the datasource is deployed.

[My Blog] [JavaRanch Journal]
damodaran puliyassery

Joined: Dec 17, 2009
Posts: 13
I use java:test in lookup.i copied the file db2java.jar to jboss<HOME>/server/default/lib folder.But i got this error while try to create connection.
I used the driver name as COM.ibm.db2.jdbc.app.DB2Driver.
Please help me...

Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
The error says you're using the wrong driver class for the url. What that means is the driver class, COM.ibm.db2.jdbc.app.DB2Driver (as you say in your message) doesn't work with the connection url you have specified in the datasource descriptor, jdbc:db2://localhost:50000/dbinventory.

It's been a long time since I worked with DB2, so unless someone can give you better help here, you'll need to look up the JDBC driver help provided by IBM and see what they say. They should include examples of how to configure the datasource properly.

In looking at the xml file you provided, I did notice two things. First, the driver class specified in the file is different from the one specified in the commented instructions in the file - one uses com while the other uses COM. Are you sure you have that correct.
Secondly, it seems the URL format is different for the different types of drivers. Again, read through the documentation and make sure you're using all the correct configuration information for the drive you wish to use.

I hope this helps,
I agree. Here's the link: http://aspose.com/file-tools
subject: Connection Pooling in JBoss v5.0 with IBM DB2
It's not a secret anymore!