This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to proof, if Session is invalidate()

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to proof if a session, that I want to destroy, is already destroyed. I cannot find any method like "Boolean isInvalid" in the HTTPSession.

I want to avoid this exception:


something like:

if (!session.isInvalid) session.invalidate();

but there is no method like isInvalid.

Any Ideas?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could just catch the exception and ignore it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic