org.opensubsystems.core.logic.impl
Class StatelessControllerImpl

java.lang.Object
  extended by org.opensubsystems.core.logic.impl.StatelessControllerImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, StatelessController
Direct Known Subclasses:
DataControllerImpl

public abstract class StatelessControllerImpl
extends java.lang.Object
implements StatelessController, javax.ejb.SessionBean

Implementation of StatelessController. This controller will be base class for all deriver controller implementation classes. The main reason why all the xdoclet EJB related tags, implements SessionBeans and methods are here is that XDoclet will not generate the required interfaces for derived beans if this is not here. And since we are using derived controllers as POJOs they cannot be abstract and therefore we have to have implementation of the SessionBean methods here. NEVER PUT ANY CODE INTO THESE METHODS since xdoclet will eventually generate xxxEjb class which will contain these same methods therefore basically hiding the implementation here We do not want to generate EJB for this class since it is abstract base class for real EJBs

Version:
$Id: StatelessControllerImpl.java,v 1.16 2007/01/07 06:14:42 bastafidli Exp $
Author:
Julo Legeny
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.13 2005/09/22 13:44:15 bastafidli
XDoclet tag:
generate="false" We need to generate interface since xdoclet will require them for interfaces derived from StatelessController. Since remote and local interfaces have to extend different ejb interfaces and we have only one base interface, the extends tags have to except our controller contain also the interfaces required by the spec
XDoclet tag:
local-extends="javax.ejb.EJBLocalObject, org.opensubsystems.core.logic.StatelessController" extends="javax.ejb.EJBObject, org.opensubsystems.core.logic.StatelessController"

Constructor Summary
StatelessControllerImpl()
           
 
Method Summary
 void constructor()
          Method overriden in each controller and called by controller manager when the controller is created.
 void ejbActivate()
          
 void ejbPassivate()
          
 void ejbRemove()
          
 void setSessionContext(javax.ejb.SessionContext sessionContext)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatelessControllerImpl

public StatelessControllerImpl()
Method Detail

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException

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

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException

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

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException

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

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException

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

constructor

public void constructor()
                 throws OSSException
Method overriden in each controller and called by controller manager when the controller is created. Controller should place any initialization call into the implementation of this method instead of into constructor since this method is called at the correct time when the controller is created as a stateless session bean and also when it is created as a POJO. We cannot call this method in EJBs from ejbCreate because xdoclet generates EJB class which implements and hides any ejbXXX method defined in this class.

Specified by:
constructor in interface StatelessController
Throws:
OSSException - - an error has occured
XDoclet tag:
XDoclet tag:
type="Supports"


Copyright © 2003 - 2006 OpenSubsystems s.r.o.