• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to create connection pool for DB2

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to deploy a CMP bean which uses a DB pool. Satabase is DB2 on OS/390. I'm using 'COM.ibm.db2.jdbc.app.DB2Driver' JDBC driver. When I start the Weblogic server (after copying the bean jar file into application directory), it gives me following error:
--------------
weblogic.ejb20.cmp.rdbms.RDBMSException: Unexpected failure while accessing table 'ejbAccounts': java.sql.SQLException: Connection Pool demoPool does not exist. java.sql.SQLException: Connection Pool demoPool does not exist. at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:148)at weblogic.jdbc.common.internal.ConnectionPool.reserveWaitSecs (ConnectionPool.java:113)
------------------
In short its not creating the connection POOL. Can you please tel me what all settings do I need to make for creating the connection pool? What should be the URL, properties ??
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amit Vaidya:
I'm trying to deploy a CMP bean which uses a DB pool. Satabase is DB2 on OS/390. I'm using 'COM.ibm.db2.jdbc.app.DB2Driver' JDBC driver. When I start the Weblogic server (after copying the bean jar file into application directory), it gives me following error:
--------------
weblogic.ejb20.cmp.rdbms.RDBMSException: Unexpected failure while accessing table 'ejbAccounts': java.sql.SQLException: Connection Pool demoPool does not exist. java.sql.SQLException: Connection Pool demoPool does not exist. at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:148)at weblogic.jdbc.common.internal.ConnectionPool.reserveWaitSecs (ConnectionPool.java:113)



Following is the property that u need to add to weblogic.properties file, for creating
connection pool for DB2 database.

Make sure of the following:

> machine on which the weblogic server will be there must have latest DB2 client (7.1)
> you should be using jdbc 2 drivers for DB2. for confirming this, go to java folder & open db2java.zip file.
It should have DataSource.class file. If it doesn't, go to java12 folder & check usejdbc2.bat file is present.
Run this file & ur drivers will be modified to use jdbc2 drivers.
> add db2java.zip file to weblogic server's classpath.

Change items in red according to ur settings.
---------------
weblogic.jdbc.connectionPool.DB2Pool=\
url=jdbc:db2:logistic,\
driver=COM.ibm.db2.jdbc.app.DB2Driver,\
loginDelaySecs=1,\
initialCapacity=1,\
maxCapacity=5,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=5,\
refreshMinutes=5,\
testTable=,\
props=user=xxxx;password=xxxx;server=xxxx
set appropriate values for'xxxx'
hope it will be of some help to u...
ramdas
 
reply
    Bookmark Topic Watch Topic
  • New Topic