On Thu, Nov 01, 2007 at 10:14:57PM +0000, David Holroyd wrote: > On Thu, Nov 01, 2007 at 12:18:41AM +0000, David Holroyd wrote: > > I see this example referenced from the servicemix-jms docs, > > > > > > http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-jms/src/test/resources/org/apache/servicemix/jms/spring-jca.xml?revision=HEAD > > > > but this seems to be a configuration for an embedded servicemix, rather > > than something I can plonk into my SU xbean.xml (?)
> I see that the underlying cause is, > > java.lang.IllegalStateException: Cannot log transactions unles > XAResources are named! So after googling this a bit more, I saw this issue, https://issues.apache.org/activemq/browse/SM-778 and reading the diff prompted me to use synchronous="true" on the JMS endpoint. This seems to make things work much better! I also changed my xbean.xml to use refs to things in JNDI, rather than constructing new beans in the SU (required some additions to the servicemix conf/jndi.xml). This is my xbean.xml now, for reference, ----8<---- <beans xmlns:clientsupplier="urn:client:supplier" xmlns:jms="http://servicemix.apache.org/jms/1.0" xmlns:jencks="http://jencks.org/2.0" xmlns:amqra="http://activemq.org/ra/1.0" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <jms:endpoint service="clientsupplier:jms" endpoint="endpoint" targetService="clientsupplier:service" defaultMep="http://www.w3.org/2004/08/wsdl/in-only" role="consumer" destinationStyle="queue" processorName="jca" bootstrapContext="#bootstrapContext" connectionFactory="#connectionFactory" resourceAdapter="#resourceAdapter" synchronous="true"> <jms:activationSpec> <amqra:activationSpec destination="supplier/subscribe" destinationType="javax.jms.Queue"/> </jms:activationSpec> </jms:endpoint> <jee:jndi-lookup id="resourceAdapter" jndi-name="java:comp/env/smx/ResourceAdapter"/> <jee:jndi-lookup id="connectionFactory" jndi-name="java:comp/env/smx/ConnectionFactory"/> <jee:jndi-lookup id="bootstrapContext" jndi-name="java:comp/env/smx/BootstrapContext"/> </beans> ---->8---- ta, dave -- http://david.holroyd.me.uk/
