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

close() / reconnect() / disconnect() question

 
pascal betz
Ranch Hand
Posts: 547
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

after i called Session.close() i can still retrieve a Connection trough the Session.connection() method. Shouldnt this method throw an Exception or return null after close() ?

Also after Session.close() i can call Session.reconnect() and get a Exception telling me that the Session is already connected. From what i read in the API the Session.close() cleans up and disconnects the session (yup, i know that i should not reconnect a closed session ... i was just experimenting and this exception puzzled me)

cheers

pascal
 
Gavin King
author
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah looks like you noticed a little bug. This occurs only if you have a session that never uses the JDBC connection (not even to commit the transaction) which would never occur in practice.

Its a trivial fix.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic