站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

ClusteredHTTPSessionBeanCmp11 (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


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

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

public class ClusteredHTTPSessionBeanCmp11
extends ClusteredHTTPSessionBeanImpl

CMP 1.1 concrete implementation for the HTTPSession bean.

Version:
$Revision: 1.2 $

Revisions:

31. decembre 2001 Sacha Labourey:

  • First implementation
Author:
Sacha Labourey.
See Also:
ClusteredHTTPSession, ClusteredHTTPSessionBeanImpl, Serialized Form

Field Summary
 long creationTime
           
 String id
           
 long lastAccessTime
           
 Serializable serializedSession
           
 
Fields inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl
isModified, tmpSession
 
Fields inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanAbstract
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.
 Serializable getSerializedSession()
           
 String getSessionId()
          Get the session identifier associated to this HTTPSession.
 void setCreationTime(long value)
           
 void setLastAccessedTime(long value)
           
 void setSerializedSession(Serializable session)
           
 void setSessionId(String sessionId)
           
 
Methods inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl
ejbLoad, ejbStore, getSession, isModified, serializeSession, setSession, unserializeSession
 
Methods inherited from class org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanAbstract
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 String id

serializedSession

public Serializable serializedSession

lastAccessTime

public long lastAccessTime

creationTime

public long creationTime
Constructor Detail

ClusteredHTTPSessionBeanCmp11

public ClusteredHTTPSessionBeanCmp11()
Method Detail

getSessionId

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

Specified by:
getSessionId in interface ClusteredHTTPSessionBusiness
Specified by:
getSessionId in class ClusteredHTTPSessionBeanAbstract

setSessionId

public void setSessionId(String sessionId)
Specified by:
setSessionId in class ClusteredHTTPSessionBeanAbstract

getSerializedSession

public Serializable getSerializedSession()
Specified by:
getSerializedSession in class ClusteredHTTPSessionBeanAbstract

setSerializedSession

public void setSerializedSession(Serializable session)
Specified by:
setSerializedSession in class ClusteredHTTPSessionBeanAbstract

getLastAccessedTime

public long getLastAccessedTime()
Description copied from interface: ClusteredHTTPSessionBusiness
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
Specified by:
getLastAccessedTime in class ClusteredHTTPSessionBeanAbstract

setLastAccessedTime

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

getCreationTime

public long getCreationTime()
Description copied from interface: ClusteredHTTPSessionBusiness
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
Specified by:
getCreationTime in class ClusteredHTTPSessionBeanAbstract

setCreationTime

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.