[activemq-dev] change to message driven POJOs in 3.1 (and 3.1-M4) for AMQ-170

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[activemq-dev] change to message driven POJOs in 3.1 (and 3.1-M4) for AMQ-170

jstrachan
In order to fix AMQ-170 we need to make a minor change to the Spring  
XML configuration for message driven POJOs.

Previously we'd create a new connector like this...

   <bean id="messageConnector" factory-method="addConnector" factory-
bean="activeMQContainer">

     <!-- subscription details -->
     <property name="activationSpec">
       <bean class="org.activemq.ra.ActiveMQActivationSpec">
         <property name="destination">
           <value>myTopic</value>
         </property>
         <property name="destinationType">
           <value>javax.jms.Topic</value>
         </property>
       </bean>
     </property>

     <!-- the bean used to process the message -->
     <property name="messageListener">
       <ref bean="consumerBean"/>
     </property>
   </bean>

We now need to use this mechanism instead...

   <bean id="messageConnector" factory-method="addConnector" factory-
bean="activeMQContainer">

     <!-- subscription details -->
     <property name="activationSpec">
       <bean class="org.activemq.ra.ActiveMQActivationSpec">
         <property name="destination">
           <value>myTopic</value>
         </property>
         <property name="destinationType">
           <value>javax.jms.Topic</value>
         </property>
       </bean>
     </property>

     <!-- the bean used to process the message -->
     <property name="ref" value="consumerBean"/>
   </bean>


James
-------
http://radio.weblogs.com/0112098/