org.jboss.soa.esb.actions
Class EJBProcessor
java.lang.Object
org.jboss.soa.esb.actions.AbstractActionLifecycle
org.jboss.soa.esb.actions.EJBProcessor
- All Implemented Interfaces:
- ActionLifecycle
public class EJBProcessor
- extends AbstractActionLifecycle
EJBProcessor is an action that can call stateless session beans
deployed in an application server.
This implementation currently supports EJB2.x and EJB3.x session beans.
Example EJB 2.x configuration:
<action name="EJBTest" class="org.jboss.soa.esb.actions.EJBProcessor">
<property name="ejb-name" value="MyBean" />
<property name="jndi-name" value="ejb/MyBean" />
<property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />
<property name="provider-url" value="localhost:1099" />
<property name="method" value="login" />
<!-- Optional output location, defaults to "DEFAULT_EJB_OUT"
<property name="esb-out-var" value="MY_OUT_LOCATION"/> -->
<property name="ejb-params">
<!-- arguments of the operation and where to find them in the message -->
<arg0 type="java.lang.String">username</arg0>
<arg1 type="java.lang.String">password</arg1>
</property>
</action>
Example EJB 3.x configuration:
<action name="EJBTest" class="org.jboss.soa.esb.actions.EJBProcessor">
<property name="ejb3" value="true" />
<property name="jndi-name" value="ejb/MyBean" />
<property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />
<property name="provider-url" value="localhost:1099" />
<property name="method" value="login" />
<!-- Optional output location, defaults to "DEFAULT_EJB_OUT"
<property name="esb-out-var" value="MY_OUT_LOCATION"/> -->
<property name="ejb-params">
<!-- arguments of the operation and where to find them in the message -->
<arg0 type="java.lang.String">username</arg0>
<arg1 type="java.lang.String">password</arg1>
</property>
</action>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EJB_NAME
public static final java.lang.String EJB_NAME
- See Also:
- Constant Field Values
JNDI_NAME
public static final java.lang.String JNDI_NAME
- See Also:
- Constant Field Values
EJB_METHOD
public static final java.lang.String EJB_METHOD
- See Also:
- Constant Field Values
JAVA_TYPE
public static final java.lang.String JAVA_TYPE
- See Also:
- Constant Field Values
INICTXFACTORY
public static final java.lang.String INICTXFACTORY
- See Also:
- Constant Field Values
PROVIDERURL
public static final java.lang.String PROVIDERURL
- See Also:
- Constant Field Values
OUT_VAR
public static final java.lang.String OUT_VAR
- See Also:
- Constant Field Values
DEFAULT_OUT
public static final java.lang.String DEFAULT_OUT
- See Also:
- Constant Field Values
EJB3_ATTRIBUTE
public static final java.lang.String EJB3_ATTRIBUTE
- See Also:
- Constant Field Values
ARG_PREFIX_LENGTH
public static final int ARG_PREFIX_LENGTH
- See Also:
- Constant Field Values
configTree
protected ConfigTree configTree
EJBProcessor
public EJBProcessor(ConfigTree config)
process
public Message process(Message msg)
throws ActionProcessingException,
ConfigurationException
- Throws:
ActionProcessingException
ConfigurationException
initialise
public void initialise()
throws ActionLifecycleException
- Description copied from class:
AbstractActionLifecycle
- Initialise the action instance.
This method is called after the action instance has been instantiated so that
configuration options can be validated.
- Specified by:
initialise in interface ActionLifecycle- Overrides:
initialise in class AbstractActionLifecycle
- Throws:
ActionLifecycleException - for errors during initialisation.