aspose file tools
The moose likes JDBC and Relational Databases and the fly likes JDBC connection state after ending session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC connection state after ending session" Watch "JDBC connection state after ending session" New topic
Author

JDBC connection state after ending session

lily ling
Greenhorn

Joined: Dec 03, 2001
Posts: 25
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

Joined: Nov 06, 2000
Posts: 1510
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


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
lily ling
Greenhorn

Joined: Dec 03, 2001
Posts: 25
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
 
subject: JDBC connection state after ending session