org.jfox.ejb
Class SessionBucket

java.lang.Object
  extended byorg.jfox.ejb.BucketSupport
      extended byorg.jfox.ejb.SessionBucket
All Implemented Interfaces:
Bucket, EJBOperation, SessionOperation
Direct Known Subclasses:
StatefulSessionBucket, StatelessSessionBucket

public abstract class SessionBucket
extends BucketSupport
implements SessionOperation

实现对于 SessionBean 统一的方法


Field Summary
 
Fields inherited from class org.jfox.ejb.BucketSupport
beanMethods, bucketMeta, homeClassName, homeMethods, interceptors, logger, oidGenerator
 
Constructor Summary
SessionBucket(BucketMetaData meta)
           
 
Method Summary
abstract  ObjectId createBean(Invocation invocation)
           
 void ejbActivate(javax.ejb.SessionBean bean)
           
 void ejbPassivate(javax.ejb.SessionBean bean)
           
 void ejbRemove(javax.ejb.SessionBean bean)
           
 javax.ejb.Handle getHandle(javax.ejb.EnterpriseBean obj)
           
 java.lang.Object getPrimaryKey(javax.ejb.EnterpriseBean obj)
           
 void remove(java.lang.Object parimaryKey)
          Remove an EJB object identified by its primary key.
abstract  void restoreBean(java.lang.Object key, EJBPoolableObject pobj)
           
abstract  EJBPoolableObject retrieveBean(java.lang.Object key)
           
 void setSessionContext(javax.ejb.SessionBean bean, javax.ejb.SessionContext ctx)
           
 
Methods inherited from class org.jfox.ejb.BucketSupport
ejbCreate, getBeanMethod, getEJBClassLoader, getEJBHome, getEJBMetaData, getHomeHandle, getHomeMethod, introspectorBeanMethods, introspectorInterfMethods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfox.ejb.EJBOperation
ejbCreate, getEJBHome, getEJBMetaData, getHomeHandle, isIdentical, remove, remove
 
Methods inherited from interface org.jfox.ejb.Bucket
invokeBean, invokeHome
 

Constructor Detail

SessionBucket

public SessionBucket(BucketMetaData meta)
Method Detail

getPrimaryKey

public java.lang.Object getPrimaryKey(javax.ejb.EnterpriseBean obj)
                               throws java.rmi.RemoteException
Specified by:
getPrimaryKey in interface EJBOperation
Throws:
java.rmi.RemoteException

getHandle

public javax.ejb.Handle getHandle(javax.ejb.EnterpriseBean obj)
                           throws java.rmi.RemoteException
Specified by:
getHandle in interface EJBOperation
Throws:
java.rmi.RemoteException

ejbActivate

public void ejbActivate(javax.ejb.SessionBean bean)
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
Specified by:
ejbActivate in interface SessionOperation
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbPassivate

public void ejbPassivate(javax.ejb.SessionBean bean)
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
Specified by:
ejbPassivate in interface SessionOperation
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbRemove

public void ejbRemove(javax.ejb.SessionBean bean)
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
Specified by:
ejbRemove in interface SessionOperation
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

setSessionContext

public void setSessionContext(javax.ejb.SessionBean bean,
                              javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Specified by:
setSessionContext in interface SessionOperation
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

remove

public void remove(java.lang.Object parimaryKey)
            throws java.rmi.RemoteException,
                   javax.ejb.RemoveException
Description copied from interface: EJBOperation
Remove an EJB object identified by its primary key.

This method can be used only for an entity bean. An attempt to call this method on a session bean will result in a RemoteException.

Specified by:
remove in interface EJBOperation
Throws:
javax.ejb.RemoveException - Thrown if the enterprise Bean or the container does not allow the client to remove the object.
java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.

retrieveBean

public abstract EJBPoolableObject retrieveBean(java.lang.Object key)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

restoreBean

public abstract void restoreBean(java.lang.Object key,
                                 EJBPoolableObject pobj)

createBean

public abstract ObjectId createBean(Invocation invocation)
                             throws java.lang.Exception
Throws:
java.lang.Exception