if(var.getValue().getItemType() != Type.JAVA_OBJECT)
{throw new XPathException(this, SessionModule.SESSION_VAR + " is not bound to a Java object.");}
final JavaObjectValue value = (JavaObjectValue) var.getValue().itemAt(0);
if(value.getObject() instanceof SessionWrapper) {
final SessionWrapper session = (SessionWrapper)value.getObject();
session.invalidate();
return Sequence.EMPTY_SEQUENCE;
} else
{throw new XPathException(this, SessionModule.SESSION_VAR + " is not bound to a session object");}
}