com.instantbank.servicing.control.ejb
Class ServicingControllerEJB
java.lang.Object
|
+--com.instantbank.servicing.control.ejb.ServicingControllerEJB
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- public class ServicingControllerEJB
- extends java.lang.Object
- implements javax.ejb.SessionBean
Session Bean implementation for ServicingController EJB. This is the
EJB-tier controller of the MVC. It is implemented as a session EJB. It
controls all the activities that happen in a client session (managing update
events through handleEvent() method) It also provides mechanisms to access
other session EJBs and variables: get services for obtaining session
variables and for contacting EJBs (entity or session) which are instanced
for the user.
- Author:
- Instant-bank (Consuelo Franky)
- See Also:
- Serialized Form
Method Summary |
void |
ejbActivate()
activation after swapping |
void |
ejbCreate()
after creation of ejb instance |
void |
ejbPassivate()
before swappping |
void |
ejbRemove()
before remove ejb instance |
Parameter |
getParameter(java.lang.String companyId,
java.lang.Long userId)
|
java.lang.String |
getW()
|
java.util.Collection |
handleEvent(ServicingEvent ese)
Principal service: Feeds the specified event to the state machine of the
business logic. |
void |
setSessionContext(javax.ejb.SessionContext sc)
Sets the sessionContext attribute of the ServicingControllerEJB
object |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
sm
private StateMachine sm
parameter
private Parameter parameter
sc
private javax.ejb.SessionContext sc
debug
private Debug debug
ServicingControllerEJB
public ServicingControllerEJB()
- Constructor for the ServicingControllerEJB object
setSessionContext
public void setSessionContext(javax.ejb.SessionContext sc)
- Sets the sessionContext attribute of the ServicingControllerEJB
object
- Specified by:
setSessionContext
in interface javax.ejb.SessionBean
- Parameters:
sc
- The new sessionContext value
ejbActivate
public void ejbActivate()
- activation after swapping
- Specified by:
ejbActivate
in interface javax.ejb.SessionBean
ejbPassivate
public void ejbPassivate()
- before swappping
- Specified by:
ejbPassivate
in interface javax.ejb.SessionBean
ejbCreate
public void ejbCreate()
- after creation of ejb instance
ejbRemove
public void ejbRemove()
- before remove ejb instance
- Specified by:
ejbRemove
in interface javax.ejb.SessionBean
handleEvent
public java.util.Collection handleEvent(ServicingEvent ese)
throws ServicingEventException
- Principal service: Feeds the specified event to the state machine of the
business logic.
- Parameters:
ese
- event corresponding to user request- Returns:
- a list of models (EJBs names)
that got updated because of the processing of this event. In
addition, the first element of the list contains the service answer
(or the "" string when this answer is not required)
- Throws:
ServicingEventException
-
getParameter
public Parameter getParameter(java.lang.String companyId,
java.lang.Long userId)
- Parameters:
companyId
- current companyuserId
- current user- Returns:
- the Parameter session EJB associated
with this session.
getW
public java.lang.String getW()
- Returns:
- the w variable for this session: these variables are maintained
by StateMachine javaBean