public
Created

sample spring context file

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/integration"
xmlns:jms="http://www.springframework.org/schema/integration/jms"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
 
 
 
 
<jms:message-driven-channel-adapter
channel="fromJMS" destination-name="test.queue" />
 
<channel id="fromJMS">
</channel>
<beans:bean id="sharedManager"
class="com.test.service.SharedManager" />
 
 
<beans:bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<beans:property name="brokerURL" value="tcp://localhost:61616" />
</beans:bean>
 
 
<header-value-router input-channel="fromJMS"
header-name="type" default-output-channel="non-matches-channel">
<mapping value="shared" channel="sharedChannel" />
<mapping value="dedicated" channel="dedicatedChannel" />
</header-value-router>
 
<channel id="sharedChannel">
 
</channel>
<channel id="dedicatedChannel">
</channel>
<channel id="non-matches-channel">
<queue />
</channel>
 
<header-value-router input-channel="sharedChannel"
header-name="action" default-output-channel="non-matches-channel">
<mapping value="deploy" channel="sharedDeployChannel" />
<mapping value="create" channel="sharedCreateChannel" />
</header-value-router>
 
<channel id="sharedDeployChannel">
<queue />
</channel>
<channel id="sharedCreateChannel">
<queue />
</channel>
 
<service-activator input-channel="sharedDeployChannel"
ref="sharedManager" method="deploy">
</service-activator>
 
<service-activator input-channel="sharedDeployChannel"
ref="sharedManager" method="create">
</service-activator>
 
<poller id="defaultPoller" default="true" max-messages-per-poll="5" fixed-rate="1000"/>
</beans:beans>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.