This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC connection state after ending session

 
lily ling
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using XML/XSL/XSP to build website. I have a xsp page which contains database accessing coding and I have "finally" block to close connections, of course. My question is : if a user end the session by any means ( either logout or close the browser ) during the database transaction, will the finally block executed or not ?
Any advice is appreciated.
Lily
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the finally block is supposed to execute if there was an excepton or not, I believe it should execute, because the browser will terminate the session.
------------------
Bosun
SCJP for the Java� 2 Platform
 
lily ling
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you ,Bosun.
By the way, may I ask if the user terminate the session, what kind of exception the JVM will get ?
Lily
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic