On Thu, Nov 01, 2007 at 12:18:41AM +0000, David Holroyd wrote:
> On Tue, Oct 30, 2007 at 12:32:06AM +0000, David Holroyd wrote:
> 
> > I've done the above, but so far, I've not got any of the reliability I
> > want.  Hunting around in the list archives, it looks like the way to do
> > this would be to have the BC rollback any current transaction on
> > failure, but I'm not sure how to make the JMS stuff be transacted.
> 
> 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 tried a bit of cut'n'paste in the dark, but the result is no messages
> arriving at the Binding Component any more, and no errors logged
> anywhere.


So I enabled DEBUG loggin for "org.apache.activemq", and see,

  INFO  - ServerSessionImpl:2            - Endpoint failed to process
  message. Reason: java.lang.RuntimeException: Endpoint after delivery
  notification failure

running in the debugger, I see that the underlying cause is,

  java.lang.IllegalStateException: Cannot log transactions unles
  XAResources are named!
  [EMAIL PROTECTED]

this happens over here,

  
org.apache.geronimo.transaction.manager.TransactionImpl$TransactionBranch.getResourceName(TransactionImpl.java:716)
  org.apache.geronimo.transaction.log.HOWLLog.prepare(HOWLLog.java:254)
  
org.apache.geronimo.transaction.manager.TransactionImpl.internalPrepare(TransactionImpl.java:443)
  
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:315)
  
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:264)
  org.jencks.XAEndpoint.afterDelivery(XAEndpoint.java:105)


Any simple way to make it happy?


Here is my xbean.xml,

<beans xmlns:custsupplier="urn:cust: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:xsi="http://www.w3.org/2001/XMLSchema-instance";>

  <jms:endpoint service="custsupplier:jms"
                endpoint="endpoint"
                targetService="custsupplier:service"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
                role="consumer"
                destinationStyle="queue"
                processorName="jca"
                bootstrapContext="#bootstrapContext"
                connectionFactory="#connectionFactory"
                resourceAdapter="#resourceAdapter"
                synchronous="false">
  <jms:activationSpec>
     <amqra:activationSpec destination="supplier/subscribe"
                           destinationType="javax.jms.Queue" />
  </jms:activationSpec>


  </jms:endpoint>

  <amqra:managedConnectionFactory id="activemqMCF"
                                  resourceAdapter="#resourceAdapter"/>
  <amqra:resourceAdapter id="resourceAdapter"
                         
serverUrl="tcp://127.0.0.1:61616?jms.asyncDispatch=true&amp;jms.useAsyncSend=true"/>
  <jencks:connectionFactory  id="connectionFactory"
                             managedConnectionFactory="#activemqMCF"
                             connectionManager="#connectionManager" />

  <!-- Transaction manager -->
  <jencks:transactionManager id="transactionManager"/>

  <!-- Work manager -->
  <jencks:workManager id="workManager"
                      transactionManager="#transactionManager"/>
  
  <!-- Bootstrap context for JCA -->
  <jencks:bootstrapContext id="bootstrapContext"
                           workManager="#workManager"
                           transactionManager="#transactionManager"/>
  
  <!-- Connection manager for JCA -->
  <jencks:connectionTracker id="connectionTracker"
                            geronimoTransactionManager="#transactionManager"/>
  <jencks:poolingSupport id="poolingSupport"
                         allConnectionsEqual="false"/>
  <jencks:connectionManager id="connectionManager"
                            containerManagedSecurity="false"
                            transaction="xa"
                            transactionManager="#transactionManager"
                            poolingSupport="#poolingSupport"
                            connectionTracker="#connectionTracker"/>

</beans>



ta much!
dave

-- 
http://david.holroyd.me.uk/

Reply via email to