Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.9.5
-
None
-
None
Description
From a C application we use the ActiveMQ-CPP libraries (version 3.9.5) to interact with ActiveMQ Classic 5.15.11.
Our application connects to a broker using the failover transport.
When starting an XA transaction, we first create an XID (an object of type XATransactionId) and use it to start the XA transaction with the XAResource::start method. Control then flows through several layers to arrive in the FailoverTransport::oneway method where a state tracker is called. The state tracker leads to a ConnectionStateTracker::processBeginTransaction method that grabs our XID (an XATransactionId) and tries to cast it to a LocalTransactionId. Both XATransactionId and LocalTransactionId inherit from TransactionId, but an XATransactionId is obviously not a LocalTransactionId and the cast fails. Our attempt to start an XA transaction therefore also fails.
Using tcp transport instead of failover allows our code to correctly start the XA transaction but is not a viable solution for production use.
Is what we observed (impossible to start an XA transaction while using failover) the expected behaviour (and if so, what is the rationale for it) or is it a bug in the library?