First verify that the secondSession != firstSession (by references). Modify your code to the following:
> HttpSession session = request.getSession(); > session.invalidate(); HttpSession newSession = request.getSession(true); if (session==newSession){ // you got the invalidated session back }else{ // ok new session was created } > newSession.setAttribute( "test", "test" ); If adding the attribute to the new session still gives an error then there might be a problem. I never used Orion so I have no practical experience with which to help you. d. Denis Kranjcec wrote:
Hello everyone! When I invalidate session and explicitly create a new session, if I try to put object to session I get java.lang.IllegalStateException: Session was invalidated I think that this is bug in app server (orion) but I'm not sure. Code is: HttpSession session = request.getSession(); session.invalidate(); session = request.getSession( true ); session.setAttribute( "test", "test" ); What is yours opinion? Thanks in advance. Denis Kranjcec ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
-- David Mossakowski Instinet Corporation ******************************************************************************* <<Disclaimer>> This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and/or CONFIDENTIAL or both. This email is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this email is not an intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return mail and permanently deleting the copy you received. Thank you. ******************************************************************************* ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html