org.jboss.ha.httpsession.beanimpl.ejb
Class ClusteredHTTPSessionBeanCmp11

java.lang.Object
  extended byorg.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanAbstract (src) 
      extended byorg.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl (src) 
          extended byorg.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanCmp11
All Implemented Interfaces:
ClusteredHTTPSessionBusiness (src) , EnterpriseBean (src) , EntityBean (src) , java.io.Serializable

public class ClusteredHTTPSessionBeanCmp11
extends ClusteredHTTPSessionBeanImpl (src)

CMP 1.1 concrete implementation for the HTTPSession bean.

See Also:
ClusteredHTTPSession (src) , ClusteredHTTPSessionBeanImpl (src) , Serialized Form

Field Summary
 long creationTime
           
 java.lang.String id
           
 long lastAccessTime
           
 java.io.Serializable serializedSession
           
 
Fields inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl (src)
isModified, tmpSession
 
Fields inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanAbstract (src)
ejbContext
 
Constructor Summary
ClusteredHTTPSessionBeanCmp11()
           
 
Method Summary
 long getCreationTime()
          Return the time when this session has been created in miliseconds since 1970.
 long getLastAccessedTime()
          Return the last time this session has been accessed in miliseconds since 1970.
 java.io.Serializable getSerializedSession()
           
 java.lang.String getSessionId()
          Get the session identifier associated to this HTTPSession.
 void setCreationTime(long value)
           
 void setLastAccessedTime(long value)
           
 void setSerializedSession(java.io.Serializable session)
           
 void setSessionId(java.lang.String sessionId)
           
 
Methods inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl (src)
ejbLoad, ejbStore, getSession, isModified, serializeSession, setSession, unserializeSession
 
Methods inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanAbstract (src)
ejbActivate, ejbCreate, ejbCreate, ejbPassivate, ejbPostCreate, ejbPostCreate, ejbRemove, getEntityContext, setEntityContext, unsetEntityContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public java.lang.String id

serializedSession

public java.io.Serializable serializedSession

lastAccessTime

public long lastAccessTime

creationTime

public long creationTime
Constructor Detail

ClusteredHTTPSessionBeanCmp11

public ClusteredHTTPSessionBeanCmp11()
Method Detail

getSessionId

public java.lang.String getSessionId()
Description copied from interface: ClusteredHTTPSessionBusiness (src)
Get the session identifier associated to this HTTPSession. This is the primary key of the entity bean.

Specified by:
getSessionId in interface ClusteredHTTPSessionBusiness (src)
Specified by:
getSessionId in class ClusteredHTTPSessionBeanAbstract (src)

setSessionId

public void setSessionId(java.lang.String sessionId)
Specified by:
setSessionId in class ClusteredHTTPSessionBeanAbstract (src)

getSerializedSession

public java.io.Serializable getSerializedSession()
Specified by:
getSerializedSession in class ClusteredHTTPSessionBeanAbstract (src)

setSerializedSession

public void setSerializedSession(java.io.Serializable session)
Specified by:
setSerializedSession in class ClusteredHTTPSessionBeanAbstract (src)

getLastAccessedTime

public long getLastAccessedTime()
Description copied from interface: ClusteredHTTPSessionBusiness (src)
Return the last time this session has been accessed in miliseconds since 1970. This method is a shortcut for getSession().getLastAccessedTime (). The reason is that the bean, when directly asked for the time, don't need to deserialize the session representation if not already done (lazy deserialization). If the only thing that changes in an HTTPSession it the last accessed time (and no attributes), the session may not be replicated on other node (to reduce traffic). Nevertheless, the new session is stored in the local bean. Consequently, if a load-balancer with sticky sessions is used, this is no problem (the local, updated, bean is used.

Specified by:
getLastAccessedTime in interface ClusteredHTTPSessionBusiness (src)
Specified by:
getLastAccessedTime in class ClusteredHTTPSessionBeanAbstract (src)

setLastAccessedTime

public void setLastAccessedTime(long value)
Specified by:
setLastAccessedTime in class ClusteredHTTPSessionBeanAbstract (src)

getCreationTime

public long getCreationTime()
Description copied from interface: ClusteredHTTPSessionBusiness (src)
Return the time when this session has been created in miliseconds since 1970. This method is a shortcut for getSession().getLastAccessedTime (). The reason is that the bean, when directly asked for the time, don't need to deserialize the session representation if not already done (lazy deserialization)

Specified by:
getCreationTime in interface ClusteredHTTPSessionBusiness (src)
Specified by:
getCreationTime in class ClusteredHTTPSessionBeanAbstract (src)

setCreationTime

public void setCreationTime(long value)
Specified by:
setCreationTime in class ClusteredHTTPSessionBeanAbstract (src)