• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling Doubt

 
Yogendra Joshi
Ranch Hand
Posts: 213
  • 0
  • 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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • 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
  • 0
  • 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
Eclipse IDE Hibernate Java
  • 0
  • 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
  • 0
  • 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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33671
316
Eclipse IDE Java VI Editor
  • 0
  • 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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic