Hi all,
For Spring 2.5.3 + ActiveMQ 5.1.0-RC3 + JCA is this the right way to configure JCA for the consumer side?
Should I be using jencks instead? Any obvious optimisations that I am missing? Also what is the difference in behaviour between JCA and JMS?
Any help would be much appreciated.Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jms="http://www.springframework.org/schema/jms" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd" default-lazy-init="true"> <context:annotation-config /> <!-- NOTE: use either jca-context.xml or jms-context.xml but not both --> <!-- http://static.springframework.org/spring/docs/2.5.x/reference/jms.html#jms-jca-message-endpoint-manager --> <bean id="resourceAdapter" class="org.springframework.jca.support.ResourceAdapterFactoryBean"> <property name="resourceAdapter"> <bean class="org.apache.activemq.ra.ActiveMQResourceAdapter"> <property name="serverUrl" value="BROKER{broker.url.failover}BROKER" /> </bean> </property> <property name="workManager"> <!-- read note on link below --> <!-- http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jca/work/SimpleTaskWorkManager.html --> <bean class="org.springframework.jca.work.SimpleTaskWorkManager"> <property name="asyncTaskExecutor"> <bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="5" /> <property name="maxPoolSize" value="5" /> </bean> </property> </bean> </property> </bean> <!-- http://static.springframework.org/spring/docs/2.5.x/reference/jms.html#jms-namespace-jca-listener-container-tbl --> <jms:jca-listener-container concurrency="5-5" resource-adapter="resourceAdapter" message-converter="shoal.shared.MessageConverter"> <jms:listener destination="BROKER{broker.queue.deploy}BROKER" ref="consumer" method="consume" /> </jms:jca-listener-container> </beans>


Reply With Quote