• 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

Connection Pooling Doubt

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Have a doubt this time on JDBC Connection pooling. I have an application which connects to JDBC via a DSN named jdbc/FCRDSN created in Websphere App Server 5.1 and the connection timeout by default has been set to 180(seconds), the problem comes when this timeout reaches and my application throws a StaleConnectionException. I have browsed internet , however did not get satisfactory answers.

What i did for Solution : Increased the timeout which is 180 to 1800, which i thought would be good 30 minutes, but it doesnt happen the way i expected and it still throws the above said Exception.

Requirement : I am trying to find a solution to this in which i can set the connection timeout to Infinity and it wont matter much since this is my local development setup. I have read Servelts in which we can set <session-timeout> in indefinate, is there a similar kind of thing for JDBC as well ?

Thanks in advance,
Yogendra N Joshi.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you closing connections when you are finished with them? A connection that is in use will not time out.
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Sturrock wrote:Are you closing connections when you are finished with them? A connection that is in use will not time out.



Hi Paul,

thanks for your reply. Actually what happens is the software (WAS 5.1 ) which i am using was a trial version and it has expired now and whenever i want to use it i need to backdate my computer system time. WHen i do that my it works fine.

After sometime, according to the company local policy, my system date again becomes today's date and henceforth if i try using it, it fails with StaleConnectionException

IS there a way out to it ?

Yogendra
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. If you are hacking round licence restrictions to use software illegally then you are kind of stuck. Any reason you can't just buy a valid licence?
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Well... I am a novice developer learning java for my career and i just do with something which i have. I cannot buy it coz WAS6.1 from IBM definitely would be costlier then my monthly salary

Any other idea ?

Yogendra
 
author & internet detective
Posts: 40211
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yogendra Joshi wrote:Any other idea ?


1) Get your company to pay for a valid license
2) Use JBoss (which is free)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic