org.cementj.base
Class DefaultSessionBean

java.lang.Object
  extended by org.cementj.base.DefaultSessionBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class DefaultSessionBean
extends java.lang.Object
implements javax.ejb.SessionBean

Default implementation for session bean. This class will do the mundane mechanics of tracking context. It also provides default implementations for ejbRemove(), ejbActivate(), and ejbPassivate(), which most developers stump anyway.

Copyright: Delta Vortex Technologies, 2003.

See Also:
Serialized Form

Field Summary
protected  javax.ejb.SessionContext _sessionContext
           
 
Constructor Summary
DefaultSessionBean()
           
 
Method Summary
 void ejbActivate()
          Hollow implementation to satisfy SessionBean interface.
 void ejbPassivate()
          Hollow implementation to satisfy SessionBean interface.
 void ejbRemove()
          Hollow implementation to satisfy SessionBean interface.
 javax.ejb.SessionContext getSessionContext()
          Returns the container-provided session context.
 javax.transaction.UserTransaction getUserTransaction()
          Obtains the UserTransaction from the container-provided session context.
 void setSessionContext(javax.ejb.SessionContext context)
          Records session context provided by the J2EE container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_sessionContext

protected javax.ejb.SessionContext _sessionContext
Constructor Detail

DefaultSessionBean

public DefaultSessionBean()
Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext context)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Records session context provided by the J2EE container.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Throws:
EJBException
RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
Hollow implementation to satisfy SessionBean interface. Override it you actually want something to happen here.

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
EJBException
RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
Hollow implementation to satisfy SessionBean interface. Override it you actually want something to happen here.

Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
EJBException
RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
Hollow implementation to satisfy SessionBean interface. Override it you actually want something to happen here.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
EJBException
RemoteException

getSessionContext

public javax.ejb.SessionContext getSessionContext()
Returns the container-provided session context.

Returns:
SessionContext

getUserTransaction

public javax.transaction.UserTransaction getUserTransaction()
Obtains the UserTransaction from the container-provided session context. This will generate an IllegalStateException if the UserTransaction isn't obtainable.

Returns:
UserTransaction


Copyright © 2003 Delta Vortex Technologies, Inc. All Rights Reserved.