1 6 7 package org.jfox.ejb; 8 9 import java.rmi.RemoteException ; 10 import javax.ejb.EJBContext ; 11 import javax.ejb.EJBException ; 12 import javax.ejb.EnterpriseBean ; 13 import javax.ejb.Handle ; 14 import javax.ejb.RemoveException ; 15 import javax.ejb.SessionBean ; 16 import javax.ejb.SessionContext ; 17 18 23 24 public abstract class SessionBucket extends BucketSupport { 25 26 public SessionBucket() { 27 28 } 29 30 public Object getPrimaryKey(EnterpriseBean obj) throws RemoteException { 31 throw new RemoteException ("getPrimaryKey(EJBObject obj) can not be called on an session bean"); 32 } 33 34 public Handle getHandle(EnterpriseBean obj) throws RemoteException { 35 return null; 37 } 38 39 public void ejbActivate(EnterpriseBean bean) throws EJBException , RemoteException { 40 logger.debug(bean + " activate"); 41 ((SessionBean )bean).ejbActivate(); 42 } 43 44 public void ejbPassivate(EnterpriseBean bean) throws EJBException , RemoteException { 45 logger.debug(bean + " passivate"); 46 ((SessionBean )bean).ejbPassivate(); 47 } 48 49 public void ejbRemove(EnterpriseBean bean) throws EJBException , RemoteException { 50 logger.debug(bean + " remove"); 51 ((SessionBean )bean).ejbRemove(); 52 } 53 54 public void setContext(EnterpriseBean bean, EJBContext ctx) throws EJBException , RemoteException { 55 logger.debug(bean + " setSessionContext"); 56 ((SessionBean )bean).setSessionContext((SessionContext )ctx); 57 } 58 59 public void remove(Object parimaryKey) throws RemoteException , RemoveException { 61 throw new RemoteException ("remove(java.lang.Object primaryKey) can not be used for a session bean"); 62 } 63 } | Popular Tags |