WebSphere - Websphere JDBC issue with Struts : DB Connection not getting released to the pool

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere > August 2004 > Websphere JDBC issue with Struts : DB Connection not getting released to the pool





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Websphere JDBC issue with Struts : DB Connection not getting released to the pool
madhut

2004-08-11, 2:15 am

Prerequsites:
-------------
For a specific Reason I have my Websphere Oracle JDBC Connection pool set as Min and Max size = 1.

Scneario:
---------
I have a struts action (MYAction1.do) whose action class opens a connection, does some select and closes the connection. On Success Forward it calls another action (MYAction2.do) whose success forward will lead to the final jsp. Now the action class for this chanined second action (MyAction2)again opens a coonection, does some select and closes the connection.

Problem:
--------
After executing the first set of JDBC calls of MYAction1, the control reaches MYAction2 in the same request. Now the action class of MyActions2 tries to open a connection from the connection pool it hangs indefenitely for ever.

Intresting observation:
-----------------------
Instead of forwarding it to a MyAction2, If I forward the success to a Result.JSP where i execute the same piece of code written in MyAction2's action class execute method( where I fetch the connection from pool, fetch some records and close it ) it works perfectly fine.


Hope I have made the scenarios and the problems clear. Any ideas why such a scenario happens and that when I am chaining the struts request with a single JDBC connection in the pool the second one does not work. Does it have something to do the way struts work.

Any suggestions/solutions will be of great help.

Tnx...in Advance.

Reagrds,
Madhu
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com