Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
xml
xml
<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
xml
xml
<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="jms/ConnectionFactory"&nbsp; 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>