Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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 ]
 
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic