• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

'Connection has already been closed'. Random error connecting with a pool, platform i

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I've got a problem I cannot solve, and really hope in someone's help...
The fact is: I'm working on a webapp which doesn't made use of frameworks or patterns or similars. I introduced the DAO pattern in order to organize and speed up the work. At the core of the new classes there is the DBDAO, and this is the way it obtains the connection:


Every new class that needs to access the db extends DBDAO and retrieves the conn with this method. In order to make things work without changing all the code, I modified the old class named 'Connessione' and made it extend DBDAO. Here is its method:



That's all. Finished with the code.
Now, if someone uses the new classes extending DBDAO, all goes well. But for some old function that still work with Connessione.getConnessione(), connection closes suddenly with no reason.
For example, calling a page with some combo box populated with a db connection, you catch a:



or sometimes:



That is, the conn is closed while used to populate the combo box. I don't understand who closes it.
Moreover, that happens randomly: 1 or 2 times over 4 hits on the page. The other times, all goes well. Most of the other pages, all goes well. So I don't think I have to search for a bug in the code.
Now, I'm working with BEA WL 8.1 sp 5 and Oracle 9.2.0.1.0 .
The error turns out even if I work locally (with Tomcat 5.5.23).
The webapp made use of a custom driver beforehand, and I replaced it with oracle's driver.
I tried to set the Connection Pool with oracle.jdbc.driver.OracleDriver and oracle.jdbc.OracleDriver .
I left the default for the connection pool, and then tried to set (BEA):
Connection Reserve Timeout: -1
Test Created Connections: On
with no changes.

The connection suddenly and randomly closes.

Any help would be appreciated...

Many thanks
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic