Advertisement
tercnem

Untitled

Apr 15th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:jms="http://www.springframework.org/schema/jms" xmlns:amq="http://activemq.apache.org/schema/core"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans.xsd
  8. http://www.springframework.org/schema/context
  9. http://www.springframework.org/schema/context/spring-context.xsd
  10. http://www.springframework.org/schema/jms
  11. http://www.springframework.org/schema/jms/spring-jms.xsd
  12. http://activemq.apache.org/schema/core
  13. http://activemq.apache.org/schema/core/activemq-core.xsd">
  14.  
  15. <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
  16. <property name="environment">
  17. <props>
  18. <prop key="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory
  19. </prop>
  20. <prop key="java.naming.provider.url">tcp://localhost:61616</prop>
  21. </props>
  22. </property>
  23. </bean>
  24. <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
  25. <property name="jndiTemplate" ref="jndiTemplate" />
  26. <property name="jndiName" value="QueueConnectionFactory" />
  27. </bean>
  28. <bean id="consumerConnectionFactory"
  29. class="org.springframework.jms.connection.SingleConnectionFactory">
  30. <constructor-arg ref="connectionFactory" />
  31. </bean>
  32.  
  33. <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
  34. <constructor-arg name="connectionFactory" ref="connectionFactory"></constructor-arg>
  35. <property name="defaultDestinationName" value="syncLog"></property>
  36. </bean>
  37.  
  38. <!-- Incoming message -->
  39. <bean id="incomingMessageListener" class="id.co.sts.stwn.syncapp.hq.IncomingSyncLogMessageProcessor" />
  40.  
  41. <jms:listener-container container-type="default"
  42. connection-factory="consumerConnectionFactory" acknowledge="auto">
  43. <jms:listener destination="synclog" ref="incomingMessageListener" />
  44. </jms:listener-container>
  45.  
  46. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement