public RemoteSession(HttpSession session){
  super();
  debug=Debug.getInstance("remoteSession");
  this.session=(HttpSession)session;
  creationTime=session.getCreationTime();
  id=session.getId();
  lastAccessedTime=session.getLastAccessedTime();
  maxInactiveInterval=session.getMaxInactiveInterval();
  isNew=session.isNew();
  internalAttributes=new HashMap();
  Enumeration aNames=getAttributeNames();
  while (aNames.hasMoreElements()) {
    String attributeName=(String)aNames.nextElement();
    if (isSerializable(getAttribute(attributeName)) && !attributeName.equals("LoginCallbacks") && !attributeName.equals("AuthContext")) {
      internalAttributes.put(attributeName,getAttribute(attributeName));
      internalAttributeNames.add(attributeName);
      debug.message("adding attr=" + attributeName + ", "+ getAttribute(attributeName));
    }
  }
}

public RemoteSession ( HttpSession session ) { super ( ) ; debug = Debug . getInstance ( "remoteSession" ) ; this . session = ( HttpSession ) session ; creationTime = session . getCreationTime ( ) ; id = session . getId ( ) ; lastAccessedTime = session . getLastAccessedTime ( ) ; maxInactiveInterval = session . getMaxInactiveInterval ( ) ; isNew = session . isNew ( ) ; internalAttributes = new HashMap ( ) ; Enumeration aNames = getAttributeNames ( ) ; while ( aNames . hasMoreElements ( ) ) { String attributeName = ( String ) aNames . nextElement ( ) ; if ( isSerializable ( getAttribute ( attributeName ) ) && ! attributeName . equals ( "LoginCallbacks" ) && ! attributeName . equals ( "AuthContext" ) ) { internalAttributes . put ( attributeName , getAttribute ( attributeName ) ) ; internalAttributeNames . add ( attributeName ) ; debug . message ( "adding attr=" + attributeName + ", " + getAttribute ( attributeName ) ) ; } } }
construct a new session facade . this class wraps the standard httpsession object allowing it to become serializable .
