1 7 8 package org.jboss.ha.httpsession.beanimpl.ejb; 9 10 import javax.ejb.CreateException ; 11 import javax.ejb.EJBException ; 12 import javax.ejb.RemoveException ; 13 14 import java.rmi.RemoteException ; 15 import java.io.Serializable ; 16 17 import org.jboss.ha.httpsession.beanimpl.interfaces.ClusteredHTTPSessionBusiness; 18 import org.jboss.ha.httpsession.interfaces.SerializableHttpSession; 19 20 37 38 public abstract class ClusteredHTTPSessionBeanAbstract implements javax.ejb.EntityBean , ClusteredHTTPSessionBusiness 39 { 40 41 43 45 protected javax.ejb.EntityContext ejbContext; 46 47 49 51 53 public String ejbCreate (String sessionId) throws CreateException 54 { 55 this.setSessionId (sessionId); 56 return null; 57 } 58 public void ejbPostCreate (String sessionId) throws CreateException 59 {} 60 61 public String ejbCreate (String sessionId, SerializableHttpSession session) throws CreateException 62 { 63 this.setSessionId (sessionId); 64 this.setSession (session); 65 return null; 66 } 67 public void ejbPostCreate (String sessionId, SerializableHttpSession session) throws CreateException 68 {} 69 70 public abstract boolean isModified (); 73 74 76 public void ejbStore () throws EJBException , RemoteException 77 {} 78 public void ejbActivate () throws EJBException , RemoteException 79 {} 80 public void ejbPassivate () throws EJBException , RemoteException 81 {} 82 public void ejbLoad () throws EJBException , RemoteException 83 {} 84 public void setEntityContext (javax.ejb.EntityContext ctx) 85 { 86 ejbContext = ctx; 87 } 88 public void ejbRemove () throws RemoveException , EJBException , RemoteException 89 {} 90 public void unsetEntityContext () 91 { 92 ejbContext = null; 93 } 94 95 97 public abstract String getSessionId (); 98 public abstract void setSessionId (String sessionId); 99 100 public abstract Serializable getSerializedSession (); 101 public abstract void setSerializedSession (Serializable session); 102 103 public abstract long getLastAccessedTime (); 104 public abstract void setLastAccessedTime (long value); 105 public abstract long getCreationTime (); 106 public abstract void setCreationTime (long value); 107 108 public abstract SerializableHttpSession getSession () throws EJBException ; 111 public abstract void setSession (SerializableHttpSession session); 112 113 115 117 119 protected javax.ejb.EntityContext getEntityContext () 120 { 121 return ejbContext; 122 } 123 124 126 128 } 129 | Popular Tags |