wood burning stoves*
The moose likes Websphere and the fly likes websphere and db2 connection pool problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "websphere and db2 connection pool problem" Watch "websphere and db2 connection pool problem" New topic
Author

websphere and db2 connection pool problem

uskulkarni kulkarni
Greenhorn

Joined: May 14, 2005
Posts: 3
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
Saras Moven
Greenhorn

Joined: Jan 30, 2004
Posts: 2
How are you releasing the connections?

Can you show the code for releasing the code?
emm raha
Ranch Hand

Joined: Mar 18, 2003
Posts: 57
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?
Klaus Peter
Greenhorn

Joined: Aug 11, 2005
Posts: 6
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

Joined: Mar 18, 2003
Posts: 57
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

Joined: Aug 11, 2005
Posts: 6
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

Joined: Aug 11, 2005
Posts: 6
I did it already!

Now it works.

Thanks
Avi Nash
Ranch Hand

Joined: Jul 17, 2003
Posts: 69
Originally posted by Klaus Peter:
I did it already!

Now it works.

Thanks


What you did to make it work?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: websphere and db2 connection pool problem