org.jbpm.ejb.impl
Class CommandServiceBean

java.lang.Object
  extended by org.jbpm.ejb.impl.CommandServiceBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, org.jbpm.command.CommandService

public class CommandServiceBean
extends java.lang.Object
implements javax.ejb.SessionBean, org.jbpm.command.CommandService

A stateless session bean implementation of the CommandService.

Author:
Jim Rigsbee, Tom Baeyens
See Also:
Serialized Form

Constructor Summary
CommandServiceBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
          creates a command service that will be used to execute the commands that are passed in the execute method.
 void ejbPassivate()
           
 void ejbRemove()
           
 java.lang.Object execute(org.jbpm.command.Command command)
           
 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

CommandServiceBean

public CommandServiceBean()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
creates a command service that will be used to execute the commands that are passed in the execute method. The command service will be build by creating a jbpm configuration. In case the environment key JbpmCfgResource is specified for this bean, that value will be used to resolve the jbpm configuration file as a resource. If that key is not configured, the default jbpm configuration file will be used (jbpm.cfg.xml).

Throws:
javax.ejb.CreateException

execute

public java.lang.Object execute(org.jbpm.command.Command command)
Specified by:
execute in interface org.jbpm.command.CommandService

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean