3.5.1.3. Session Bean Class Example (EJB 2)
public class ASessionBean implements javax.ejb.SessionBean
{
// Method that provides reference to standard session context object
public void setSessionContext (SessionContext sessionContext) { ... };
// Method that is called after construction
public void ejbCreateOneWay (int iArgument)
throws RemoteException, CreateException
{ ... }
public void ejbCreateAnotherWay (int iArgument, String sArgument)
throws RemoteException, BadAccountException, CreateException
{ ... }
// Method that is called before destruction
public void ejbRemove () { ... }
// Methods that are called after activation and before passivation
public void ejbActivate () { ... }
public void ejbPassivate () { ... };
// Some business methods ...
public void myMethodOne (int iArgument) { ... }
public int myMethodTwo (Object oArgument) { ... }
}