Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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