• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
[ August 10, 2004: Message edited by: Madhu Menon ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!