Re: Configuring XA with ActiveMQ and Liberty

2021-08-22 Thread Marco Bettiol
Hi Ben, we experienced a similar behaviour on widlfly + activeq-rar with your exact use case while using XA for both database and broker connections. >From our checks both XA connections seemed configured correctly, we supposed the problem was caused by the commit on phase 2 of the "2PC algorithm"

Re: Configuring XA with ActiveMQ and Liberty

2021-08-20 Thread Justin Bertram
> write message 2 to message queue (containing ID of record in DB) In my estimation, this is the step that is not participating in the JTA transaction started by the MDB. I assume the connection factory you're using here is either looked up in JNDI manually or is injected somehow. How this connect

Re: Configuring XA with ActiveMQ and Liberty

2021-08-16 Thread Ben Pirt
Hi Justin, Thanks for your reply and apologies for the delayed response - I'm just back from holiday. We're using Container Managed Transactions in our MDBs but when we inspect the type of the connection factory in the bean during runtime it is the non-XA version that seems to be being used. I

Re: Configuring XA with ActiveMQ and Liberty

2021-07-31 Thread Justin Bertram
In a Java EE server MDBs are executed with configurable transaction semantics. By default, container-managed transaction semantics are used which incorporate the consumption of the message by the MDB into a JTA (which is XA) transaction which includes all other enlisted resources (e.g. databases, J

Re: Configuring XA with ActiveMQ and Liberty

2021-07-31 Thread Tim Bain
Is this a race condition (i.e. the database transaction is committed if you wait a second or two), or is the transaction ultimately failing and being rolled back? If it's not the former, fix that problem (whatever it is) first. Tim On Sat, Jul 31, 2021, 2:25 AM Ben Pirt wrote: > We're modernisi

Re: Configuring XA with ActiveMQ and Liberty

2021-07-30 Thread Ben Pirt
We're modernising an existing enterprise Java application that relies on XA. It is a message oriented architecture and we're finding race conditions are occurring sporadically. We receive a message into a Message Driven Bean, interact with the database and then fire off another message to anothe

Re: Configuring XA with ActiveMQ and Liberty

2021-07-30 Thread Justin Bertram
What behavior do you expect versus what you actually observe? In other words, what exactly isn't working? Also, what is your XA use-case? Justin On Fri, Jul 30, 2021 at 4:33 PM Ben Pirt wrote: > Hi Justin, we're using JCA with the resource adapter. > > We've defined the RA, the Queue Connecti

Re: Configuring XA with ActiveMQ and Liberty

2021-07-30 Thread Ben Pirt
Hi Justin, we're using JCA with the resource adapter. We've defined the RA, the Queue Connection Factory and the Activation Spec in the server.xml configuration file. Cheers, Ben > On 30 Jul 2021, at 22:28, Justin Bertram wrote: > > I'm not too familiar with Open Liberty. Can you be more spec

Re: Configuring XA with ActiveMQ and Liberty

2021-07-30 Thread Justin Bertram
I'm not too familiar with Open Liberty. Can you be more specific about how you're attempting to integrate? Are you using plain JMS or JCA via the ActiveMQ resource adapter? Justin On Fri, Jul 30, 2021 at 7:38 AM Ben Pirt wrote: > Hello all, > I wonder if anyone might be able to help us out - w