activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Corsi <>
Subject Re: Accessing an javax.transaction.Transaction and/or javax.transaction.TransacionManager instance
Date Fri, 24 Feb 2006 18:27:21 GMT
Hi Hiram,

Thanks for the reply but this interface will not give me any access to a 
Transaction instance. It only offers access to an XASession of the JMS 

My product already knows how to generate a XAResource instance. It just 
needs to enlist this resource with the current global transaction.

In the case of activemq, i would assume that whenever a user uses an 
XAConnection. activemq would create a XAResource that it enlists with 
the broker jta integration and return an XASession instances that wraps 
the XAResource enlisted with the jta transaction.

my question is how can I get a reference to the jta transaction 
associated to a given xasession? the jms spec does not seem to describe 
this case.



Hiram Chirino wrote:

> Hi Claudio,
> You could use activemq's XA enabled connection factory classes.  For  
> more info just refer to the JMS spec, It describes how JMS should  
> implement XA.  You could also refer to, which explains how  
> to use message driven pojos with full XA without needing a J2EE sever.
> Regards,
> Hiram
> On Feb 23, 2006, at 4:24 PM, Claudio Corsi wrote:
>> Hi all,
>> Some background, I have a dbms product that provides the ability to  
>> implicitly integrated with a jta implementation, (we use the  
>> Transaction enlist/delist methods using a XAResource instance).  This 
>> is done through the implementation of an interface. The user  will 
>> just uses our product within a jta aware application and  internally 
>> we use the implemented interface to get access to the  containers jta 
>> transaction and/or transaction manager.
>> What I'm wondering is if there is a standard api for me to access a  
>> standalone activemq application jta implementation? I did notice  that 
>> the DefaultBroker has a getTransactionManager method. I just  was not 
>> able to determine how to get access to this method call?
>> Is it possible for me to get access to the DefaultBroker?
>> I'm assuming that our product will be used within a onMessage  
>> callback. This would be where we would use the implemented  interface 
>> to get access to the current transaction/transaction  manager, if any 
>> exists.
>> thanks,
>> --Claudio

View raw message