File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC connection state after ending session

 
lily ling
Greenhorn
Posts: 25
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic