Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: None  |  size: 1.43 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Spring Integration with JMS configuration
  2. <!-- Channels -->
  3. <jms:channel id="inputChannel" queue-name="test.queue" connection-factory="connectionFactory"/>
  4.  
  5. <!-- Consumers -->    
  6. <jms:inbound-channel-adapter id="jmsIn" destination="requestQueue" channel="inputChannel" extract-payload="true" connection-factory="connectionFactory">
  7.     <integration:poller time-unit="SECONDS" fixed-rate="5"/>
  8. </jms:inbound-channel-adapter>
  9.  
  10. <integration:service-activator id="testActivator" input-channel="inputChannel" ref="testServiceActivator" auto-startup="true" method="handle">
  11. </integration:service-activator>
  12.  
  13. <!-- Bean definitions -->
  14. <bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
  15.     <property name="targetConnectionFactory">
  16.         <bean class="org.apache.activemq.ActiveMQConnectionFactory">
  17.             <property name="brokerURL" value="tcp://127.0.0.1:61616"/>            
  18.         </bean>
  19.     </property>
  20.     <property name="sessionCacheSize" value="10"/>
  21.     <property name="cacheProducers" value="false"/>
  22. </bean>
  23.  
  24. <bean id="requestQueue" class="org.apache.activemq.command.ActiveMQQueue">
  25.     <constructor-arg name="name" value="test.topic"/>
  26. </bean>
  27.  
  28. <bean id="testServiceActivator" class="com.paddypower.financials.integration.PriceDistributionServiceActivator"/>
  29.        
  30. <bean id="requestQueue" class="org.apache.activemq.command.ActiveMQTopic">
  31.     <constructor-arg name="name" value="test.topic"/>
  32. </bean>