...
Code Block | ||||
---|---|---|---|---|
| ||||
<cargo.resource.resource.jmsConnectionFactory> cargo.resource.name=jms/ConnectionFactory| cargo.resource.type=com.caucho.jms.JVMTopicConnectionFactory| </cargo.resource.resource.jmsConnectionFactory> <cargo.resource.resource.jmsModelRunTopic>jmsMyTopic> cargo.resource.name=jms/modelRunTopicmyTopic| cargo.resource.type=javax.jms.Topic| cargo.resource.class=com.caucho.jms.memory.MemoryTopic| cargo.resource.parameters=topicName=modelRunTopicmyTopic </cargo.resource.resource.jmsModelRunTopic>jmsMyTopic> |
After you run 'mvn cargo:start', you can verify the config made it into your resin.conf with:
$> less target/resin3x/home/conf/resin.conf
...
You can also add a resource-ref for the Topic, but you don't need it for springthat is not necessarily required.
A spring config might look like this:
Code Block | ||||
---|---|---|---|---|
| ||||
<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="jms/ConnectionFactory" proxy-interface="javax.jms.ConnectionFactory" lookup-on-startup="false" resource-ref="true"/>
<bean id="myTopicListener" class="foo.bar.MyTopicListenerBean"/>
<jms:listener-container connection-factory="jmsConnectionFactory" destination-type="topic">
<jms:listener destination="myTopic" ref="myTopicListener" method="receiveMessage" />
</jms:listener-container>
|