This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<!-- $Id: db2-ds.xml 43824 2006-04-16 21:48:44Z wprice $ -->


<!-- DB2 Universal Driver Note connection URL is in form of

Default port for Type 4 driver is 50000

Note, host and port must be specified if using Type 4 driver. And be forewarned, no native
XA support is provided with Type 4; you must set a DB property calling for Type 2 to get XA


Please see
or the DB2 JDBC application developers manual.


<!-- New org.jboss.resource.adapter.jdbc.vendor.DB2ExceptionSorter



<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>

<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->



And in J2EE i write this code
ic=new javax.naming.InitialContext();
catch(Exception e)
System.out.println("Error in DBConnection "+e.getMessage());

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: 9947

See this

[My Blog] [JavaRanch Journal]
Peter Johnson

Joined: May 14, 2008
Posts: 5812

Damodaran, in the future please use the "code" tags to post source code. You can do that by selecting the source code and clicking the Code button above the editor window. It makes posts much easier to read. (You can practice by editing your post to use the Code tags.)

Oh, and welcome to Java Ranch!

JBoss In Action
I agree. Here's the link:
subject: Connection Pooling in JBoss v5.0 with IBM DB2
Similar Threads
Connection Pooling in JBoss v5.0 with IBM DB2
A JTA EntityManager cannot use getTransaction()
Configuring Datasource to use a default schema
Error in DB2 connection Pooling
Unable to obtain datasource