• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Connection Pooling in JBoss v5.0 with IBM DB2

Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0512kokkat/
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....
Posts: 10445
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
    Bookmark Topic Watch Topic
  • New Topic