public class WebServiceMessageDrivenBean
extends org.springframework.ejb.support.AbstractJmsMessageDrivenBean
MessageDrivenBean that can be used to handleMessage incoming JMS messages.
This class needs a JMS ConnectionFactory, a WebServiceMessageFactory and WebServiceMessageReceiver to operate. By default, these are obtained by doing a bean lookup on the bean factory
provided by AbstractEnterpriseBean.getBeanFactory() the super class.createConnectionFactory(),
createMessageFactory(),
createMessageReceiver(),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION_FACTORY_BEAN_NAME
Well-known name for the
ConnectionFactory object in the bean factory for this bean. |
static String |
MESSAGE_FACTORY_BEAN_NAME
Well-known name for the
WebServiceMessageFactory bean in the bean factory for this bean. |
static String |
MESSAGE_RECEIVER_BEAN_NAME
Well-known name for the
WebServiceMessageReceiver object in the bean factory for this bean. |
| Constructor and Description |
|---|
WebServiceMessageDrivenBean() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.jms.Connection |
createConnection(javax.jms.ConnectionFactory connectionFactory)
Create a JMS
Connection using the given ConnectionFactory. |
protected javax.jms.ConnectionFactory |
createConnectionFactory()
Creates a connection factory.
|
protected WebServiceMessageFactory |
createMessageFactory()
Creates a message factory.
|
protected WebServiceMessageReceiver |
createMessageReceiver()
Creates a connection factory.
|
protected javax.jms.Session |
createSession(javax.jms.Connection connection)
Creates a JMS
Session. |
protected void |
onEjbCreate()
|
void |
onMessage(javax.jms.Message message)
Delegates to
JmsMessageReceiver.handleMessage(Message,Session). |
ejbCreate, getMessageDrivenContext, setMessageDrivenContextejbRemove, getBeanFactory, onEjbRemove, setBeanFactoryLocator, setBeanFactoryLocatorKeypublic static final String CONNECTION_FACTORY_BEAN_NAME
ConnectionFactory object in the bean factory for this bean.public static final String MESSAGE_FACTORY_BEAN_NAME
WebServiceMessageFactory bean in the bean factory for this bean.public static final String MESSAGE_RECEIVER_BEAN_NAME
WebServiceMessageReceiver object in the bean factory for this bean.public void onMessage(javax.jms.Message message)
JmsMessageReceiver.handleMessage(Message,Session).protected void onEjbCreate()
onEjbCreate in class org.springframework.ejb.support.AbstractMessageDrivenBeancreateConnectionFactory(),
createMessageFactory(),
createMessageReceiver()protected javax.jms.ConnectionFactory createConnectionFactory()
throws Exception
CONNECTION_FACTORY_BEAN_NAME.Exceptionprotected WebServiceMessageFactory createMessageFactory()
MESSAGE_FACTORY_BEAN_NAME.protected WebServiceMessageReceiver createMessageReceiver()
MESSAGE_RECEIVER_BEAN_NAME.protected javax.jms.Connection createConnection(javax.jms.ConnectionFactory connectionFactory)
throws javax.jms.JMSException
Connection using the given ConnectionFactory.
This implementation uses JMS 1.1 API.connectionFactory - the JMS ConnectionFactory to create a Connection withjavax.jms.JMSException - if thrown by JMS API methodsConnectionFactory.createConnection()protected javax.jms.Session createSession(javax.jms.Connection connection)
throws javax.jms.JMSException
Session. Default implementation creates a non-transactional, auto acknowledged session.
This implementation uses JMS 1.1 API.connection - the JMS Connection to create a Session forjavax.jms.JMSException - if thrown by JMS API methodsConnection.createSession(boolean,int)Copyright © 2005–2015 The Spring Web Services Framework. All rights reserved.