Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

websphere and db2 connection pool problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am running jsp/servlet web application on IBM WebSphere Application Server V6 and accessing database connection from database server IBM UDB DB2 V8.2.

As of now, only 10 users are consistent connected to database for testing web application but they are not getting connection consistent (not stable) and they get disconnected many times and the following exception throws in the logs :-

[7/19/05 16:57:41:113 IST] 0000002d SystemErr R at
com.saterisystems.sasinv1r0.webarch.iarchie.database.ConnectionPoolForWeb.getConnection(ConnectionPoolForWeb.java:283)
[7/19/05 16:57:41:113 IST] 0000002d SystemErr R at
com.saterisystems.sasinv1r0.webarch.iarchie.database.ConnectionPoolForWeb.getConnection(ConnectionPoolForWeb.java:283)
[7/19/05 16:57:41:113 IST] 0000002d SystemErr R at
com.saterisystems.sasinv1r0.webarch.iarchie.database.ConnectionPoolForWeb.getConnection(ConnectionPoolForWeb.java:283)
[7/19/05 16:57:41:113 IST] 0000002d SystemErr R at
com.saterisystems.sasinv1r0.webarch.iarchie.database.ConnectionPoolForWeb.getConnection(ConnectionPoolForWeb.java:283)

Websphere Connection is set as Max 30 and Min. 20 (per data source)

After this research I have increased MAXAPPLS and MAXAGENTS value in databases. Default is 40 and I increased unto 155 but still user is not able to connect to databases.

Note: I checked that we are releasing the database connection properly in our code.

It is very urgent. Can anybody help me to resolve this problem?

Note: Our Developers (programmers) had already release all the connection in our application.

I tried to resolve this problem? Why user is getting disconnection frequently.

I would very appreciate your response.
Thanks & Regards
uday
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you releasing the connections?

Can you show the code for releasing the code?
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A couple of comments:

IBM's DB2 driver is v. problematic (slow, unreliable, etc.). Which OS is your DB2 database on? Ours is on AIX, and I wasn't able to find an alternative vendor's driver for our OS/DB2 version combination. But I suggest you research alternatives if you decide to stick with DB2 going forward.

Did your ConnectionPoolForWeb.java work during unit testing, with a single connection?

Have you checked that the database does not limit the incoming connections to a # < 10?
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I am a newbie at WebSphere and I try to use connection pools to connect to the DB2 database.
When I test the datasources I created, the test are working, but I am not able to connect from my java code to it.

There is a error appearing in the log files when i start the server:

Exception is: javax.naming.NameNotFoundException: Context: localhostNode01Cell/nodes/localhostNode01/servers/server1, name: jdbc/Sessions: First component in name Sessions not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0

Do you have any suggestions how to solve?
 
emm raha
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you're unable to look up the datasource that you created. Once your datasource reference is added to web.xml, look it up using:

(Note prefix to reference name.)
[ August 12, 2005: Message edited by: emm raha ]
 
Klaus Peter
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
first of all, thank you.

As I told I am a absolute newbie.

So what I've done up to now.

I created the datasource and tested it in the Admin console. Then I wrote the Java code. Exported the project as war file and imported it on the server. Do I have to select some options within the WAS or within so that the datasources can be accessed?

The line I wrote is:

DataSource ds = (DataSource) new javax.naming.InitialContext().lookup("java:comp/env/UKMFG5");

and the error i got is:

[8/15/05 9:29:54:810 PDT] 00000041 SystemOut O Error while connecting the database: javax.naming.NameNotFoundException: Name "comp/env/UKMFG5" not found in context "java:".

Can anyone help me?
 
Klaus Peter
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did it already!

Now it works.

Thanks
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Klaus Peter:
I did it already!

Now it works.

Thanks



What you did to make it work?
 
reply
    Bookmark Topic Watch Topic
  • New Topic