com.stellent.cis.client.command.ejb.invoker
Class CommandInvokerBean

java.lang.Object
  extended by org.springframework.ejb.support.AbstractStatelessSessionBean
      extended by com.stellent.cis.client.command.ejb.CommandStatelessSessionBean
          extended by com.stellent.cis.client.command.ejb.invoker.CommandInvokerBean
All Implemented Interfaces:
ICommandExecutor, java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class CommandInvokerBean
extends CommandStatelessSessionBean
implements ICommandExecutor

See Also:
Serialized Form

Field Summary
static java.lang.String BEAN_FACTORY_PATH_ENVIRONMENT_KEY
           
protected  ICommandExecutor m_executorService
           
protected  org.apache.commons.logging.Log m_log
           
 
Fields inherited from class org.springframework.ejb.support.AbstractStatelessSessionBean
logger
 
Constructor Summary
CommandInvokerBean()
           
 
Method Summary
 void ejbRemove()
           
 java.lang.Object executeCommand(ICommand command)
          Execute the command described by the command bean.
protected  org.springframework.beans.factory.BeanFactory getBeanFactory()
           
 ICommandExecutor getExecutorService()
           
protected  javax.ejb.SessionContext getSessionContext()
           
 boolean isLocalInvocation()
           
protected  void onEjbCreate()
          Subclasses must implement this method to do any initialization they would otherwise have done in an ejbCreate() method.
protected  void onEjbRemove()
           
 void setBeanFactoryLocator(org.springframework.beans.factory.access.BeanFactoryLocator arg0)
           
 void setBeanFactoryLocatorKey(java.lang.String arg0)
           
 void setSessionContext(javax.ejb.SessionContext arg0)
           
 
Methods inherited from class com.stellent.cis.client.command.ejb.CommandStatelessSessionBean
ejbCreate
 
Methods inherited from class org.springframework.ejb.support.AbstractStatelessSessionBean
ejbActivate, ejbPassivate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.SessionBean
ejbActivate, ejbPassivate, ejbRemove, setSessionContext
 

Field Detail

m_log

protected org.apache.commons.logging.Log m_log

m_executorService

protected ICommandExecutor m_executorService

BEAN_FACTORY_PATH_ENVIRONMENT_KEY

public static final java.lang.String BEAN_FACTORY_PATH_ENVIRONMENT_KEY
See Also:
Constant Field Values
Constructor Detail

CommandInvokerBean

public CommandInvokerBean()
Method Detail

getExecutorService

public ICommandExecutor getExecutorService()

onEjbCreate

protected void onEjbCreate()
                    throws javax.ejb.CreateException
Subclasses must implement this method to do any initialization they would otherwise have done in an ejbCreate() method. In contrast to ejbCreate, the BeanFactory will have been loaded here.

The same restrictions apply to the work of this method as to an ejbCreate() method.

Specified by:
onEjbCreate in class org.springframework.ejb.support.AbstractStatelessSessionBean
Throws:
javax.ejb.CreateException

executeCommand

public java.lang.Object executeCommand(ICommand command)
                                throws CommandException
Execute the command described by the command bean.

Specified by:
executeCommand in interface ICommandExecutor
Parameters:
command - the populated command bean
Returns:
return value from the command, possibly null
Throws:
CommandException

isLocalInvocation

public boolean isLocalInvocation()
Specified by:
isLocalInvocation in interface ICommandExecutor
Returns:
true if the commands are being executed locally (i.e. on the same JVM)

setSessionContext

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

getSessionContext

protected final javax.ejb.SessionContext getSessionContext()

setBeanFactoryLocator

public void setBeanFactoryLocator(org.springframework.beans.factory.access.BeanFactoryLocator arg0)

setBeanFactoryLocatorKey

public void setBeanFactoryLocatorKey(java.lang.String arg0)

getBeanFactory

protected org.springframework.beans.factory.BeanFactory getBeanFactory()

ejbRemove

public void ejbRemove()

onEjbRemove

protected void onEjbRemove()