• 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

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

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a specific Reason I have my Websphere Oracle JDBC Connection pool set as Min and Max size = 1.

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.

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.

[ August 10, 2004: Message edited by: Madhu Menon ]
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic