Howdy, >Yes, you are right. For tracking all logged in users I store a reference to > every users HttpSession in his user object which is itself in the session >context. > >HttpSession is org.apache.catalina.session.StandardSessionFacade in tomcat >and this class does not implement java.io.Serializable. Any idea how I can >fix this problem?
It depends on how much work you want to do. It's not a good idea for your to depend on implementation details of the Catalina session fa�ade. However, the session ID is a primitive (String) which is serializable. So instead of storing a reference to the session, store a reference to the session ID. Have an HttpSessionListener which keeps a Map of session IDs to sessions. You can get the session for a given session ID from your listener as needed. This solution is container-independent and portable. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
