Seam makes it easy to send and receive JMS messages to and from Seam components.
To configure Seam's infrastructure for sending JMS messages, you need to tell Seam about any topics and queues you want to send messages to, and also tell Seam where to find the QueueConnectionFactory
and/or TopicConnectionFactory
.
Seam defaults to using UIL2ConnectionFactory
which is the usual connection factory for use with JBossMQ. If you are using some other JMS provider, you need to set one or both of queueConnection.queueConnectionFactoryJndiName
and topicConnection.topicConnectionFactoryJndiName
in seam.properties
, web.xml
or components.xml
.
You also need to list topics and queues in components.xml
to install Seam managed TopicPublisher
s and QueueSender
s:
<jms:managed-topic-publisher name="stockTickerPublisher"
auto-create="true topic-jndi-name="topic/stockTickerTopic"/>
<jms:managed-queue-sender name="paymentQueueSender" auto-create="true"
queue-jndi-name="queue/paymentQueue"/>