org.apache.openejb.test.stateless
Class BasicStatelessBean

java.lang.Object
  extended by org.apache.openejb.test.stateless.BasicStatelessBean
All Implemented Interfaces:
Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, javax.ejb.TimedObject

public class BasicStatelessBean
extends Object
implements javax.ejb.SessionBean, javax.ejb.TimedObject

Author:
David Blevins, Richard Monson-Haefel
See Also:
Serialized Form

Constructor Summary
BasicStatelessBean()
           
 
Method Summary
 String businessMethod(String text)
          Maps to BasicStatelessObject.businessMethod
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreateObject()
           
 void ejbPassivate()
          The passivate method is called before the instance enters the "passive" state.
 void ejbRemove()
          A container invokes this method before it ends the life of the session object.
 void ejbTimeout(javax.ejb.Timer timer)
           
 OperationsPolicy getAllowedOperationsReport(String methodName)
          Maps to BasicStatelessObject.getAllowedOperationsReport

Returns a report of the allowed opperations for one of the bean's methods.

 Properties getPermissionsReport()
          Maps to BasicStatelessObject.getPermissionsReport

Returns a report of the bean's runtime permissions

 String remove(String str)
           
 void scheduleTimer(String name)
           
 void setSessionContext(javax.ejb.SessionContext ctx)
          Set the associated session context.
protected  void testAllowedOperations(String methodName)
           
 void throwApplicationException()
          Throws an ApplicationException when invoked
 void throwSystemException_NullPointer()
          Throws a java.lang.NullPointerException when invoked This is a system exception and should result in the destruction of the instance and invalidation of the remote reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicStatelessBean

public BasicStatelessBean()
Method Detail

businessMethod

public String businessMethod(String text)
Maps to BasicStatelessObject.businessMethod

Returns:
See Also:
BasicStatelessObject.businessMethod(java.lang.String)

scheduleTimer

public void scheduleTimer(String name)

throwApplicationException

public void throwApplicationException()
                               throws ApplicationException
Throws an ApplicationException when invoked

Throws:
ApplicationException

throwSystemException_NullPointer

public void throwSystemException_NullPointer()
Throws a java.lang.NullPointerException when invoked This is a system exception and should result in the destruction of the instance and invalidation of the remote reference.


getPermissionsReport

public Properties getPermissionsReport()
Maps to BasicStatelessObject.getPermissionsReport

Returns a report of the bean's runtime permissions

Returns:
See Also:
BasicStatelessObject.getPermissionsReport()

getAllowedOperationsReport

public OperationsPolicy getAllowedOperationsReport(String methodName)
Maps to BasicStatelessObject.getAllowedOperationsReport

Returns a report of the allowed opperations for one of the bean's methods.

Parameters:
methodName - The method for which to get the allowed opperations report
Returns:
See Also:
BasicStatelessObject.getAllowedOperationsReport(java.lang.String)

remove

public String remove(String str)

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException,
                              RemoteException
Set the associated session context. The container calls this method after the instance creation.

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

ejbCreateObject

@MeasureSensible(value=RESULT)
public void ejbCreateObject()
                     throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      RemoteException
A container invokes this method before it ends the life of the session object. This happens as a result of a client's invoking a remove operation, or when a container decides to terminate the session object after a timeout.

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

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        RemoteException
The activate method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in the ejbPassivate() method.

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

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         RemoteException
The passivate method is called before the instance enters the "passive" state. The instance should release any resources that it can re-acquire later in the ejbActivate() method.

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

ejbTimeout

public void ejbTimeout(javax.ejb.Timer timer)
Specified by:
ejbTimeout in interface javax.ejb.TimedObject

testAllowedOperations

protected void testAllowedOperations(String methodName)


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.