Hi all,
I've just started to have a look into Spring integration framework and I'm looking for a simple working spring jms channel example.
Simple use case: a queue registered into Weblogic and a spring jms channel for listening to that queue and echo consumed messages into stdout.
Below my applicationContext.xml but I'm not sure if it is the right one :-)
Could you please help me in order to remove/add what is wrong/is missing about my applicationContext.xml ?
Thanks in advance and regards
nuvola
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jms="http://www.springframework.org/schema/integration/jms"
xmlns:stream="http://www.springframework.org/schema/integration/stream"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schem...ntegration.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schem...ration-jms.xsd
http://www.springframework.org/schem...gration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
<context:component-scan base-package="dev.spring.integration.jms"/>
<!-- Gateway is the place where process initiates -->
<jms:inbound-gateway id="jmsInboundGateway"
request-destination="myQueue"
request-channel="myListenerChannel"/>
<int:channel id="myListenerChannel"/>
<service-activator input-channel="myListenerChannel" ref="myListenerBean"/>
<!--A default JMS message listener -->
<int-jms:message-driven-channel-adapter id="jmsMessageAdapter"
destination="myQueue"
channel="myListenerJMSInChannel" />
<int:channel id="myListenerJMSInChannel" />
<stream:stdout-channel-adapter id="stdout" channel="myListenerJMSInChannel" append-newline="true"/>
<jee:jndi-lookup id="connectionFactory" jndi-name="jms/connectionFactory">
<jee:environment>
java.naming.factory.initial=weblogic.jndi.WLInitia lContextFactory
java.naming.provider.url=t3://localhost:7001
</jee:environment>
</jee:jndi-lookup>
<jee:jndi-lookup id="myQueue" jndi-name="WL.jms.Queue">
<jee:environment>
java.naming.factory.initial=weblogic.jndi.WLInitia lContextFactory
java.naming.provider.url=t3://localhost:7001
</jee:environment>
</jee:jndi-lookup>
</beans>


Reply With Quote
