PDA

View Full Version : Simple POJO example



jamie3
Sep 4th, 2008, 02:20 PM
I want to be able to create a simple POJO that can receive messages from a channel that is mapped to a topic on JMS.

Here is my code snippet






<integration:message-bus/>

<bean id="consumer" class="examples.SpringIntegrationConsumer">

</bean>

<!-- factory used to connect to JMS broker -->
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>

<integration:channel id="someChannel" />

<integration:service-activator ref="consumer" input-channel="someChannel" method="someMethod" />

<integration:jms-gateway id="jmsGateway"
connection-factory="connectionFactory"
destination-name="someTopic"
request-channel="someChannel"
expect-reply="false"
/>
</beans>



Everything runs except my POJO doesn't receive the messages. I know I am missing something.