org.jbpm.ejb
Class CommandListenerBean
java.lang.Object
org.jbpm.ejb.CommandListenerBean
- All Implemented Interfaces:
- javax.jms.MessageListener
- Direct Known Subclasses:
- JobListenerBean
public class CommandListenerBean
- extends Object
- implements javax.jms.MessageListener
This message-driven bean listens for object messages containing a
command instance. The received commands are executed by the command
service bean, using the local interface.
The body of the message must be a Java object that implements the Command interface.
The message properties, if any, are ignored.
Environment
The environment entries and resources available for customization are summarized in the table
below.
| Name |
Type |
Description |
ejb/LocalCommandService |
EJB Reference |
Link to the local session bean that executes commands on
a separate jBPM context. |
jms/JbpmConnectionFactory |
Resource Manager Reference |
Logical name of the factory that provides JMS connections for producing result messages.
Required for command messages that indicate a reply destination. |
- Author:
- Alejandro Guizar
|
Method Summary |
protected org.jbpm.command.Command |
extractCommand(javax.jms.Message message)
Retrieves a Command instance from the given message, which is assumed to be an
ObjectMessage. |
void |
onMessage(javax.jms.Message message)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandListenerBean
public CommandListenerBean()
onMessage
public void onMessage(javax.jms.Message message)
- Specified by:
onMessage in interface javax.jms.MessageListener
extractCommand
protected org.jbpm.command.Command extractCommand(javax.jms.Message message)
throws javax.jms.JMSException
- Retrieves a
Command instance from the given message, which is assumed to be an
ObjectMessage.
Subclasses may override this method to materialize the command in some other way.
- Throws:
javax.jms.JMSException
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.