You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Roland T. Lichti" <ro...@telefonica.de> on 2009/11/05 06:58:49 UTC

Re: XAResourceRecovery for ActiveMQ on JBoss

Hi Scott,

Scott McNab schrieb:

We have the same problem. I just checked the source of the RA and found
some not so nice information.

1. ActiveMQ has XA support.
2. The ActiveMQ RA does encapsulate it from the API. Every layer again
works only with the non-XA-versions of session, connection, ...

Therefore to get the XAConnectionFactory bound to JNDI a complete
rewrite of the RA is needed. Some concepts may be
even incompatible with that idea (like using the inbound session for
everything else).

I'm willing to do try it - but only if there is a chance to get it back
into SVN (I don't need to be the committer, somebody may check my code
and even refuse it if it is not up to the standards). But if the idea of
a full XA compatible RA is not wanted by the core team, it is not worth
the time to code it ...

bye,
    Roland

-- 
Roland Thomas Lichti
IT Application Manager

Telefónica o2 Germany GmbH & Co. OHG
Hülshorstweg 30, 33415 Verl
t: +49 5246 80 1121, f: +49 5246 80 2121
roland.lichti@telefonica.de
http://www.telefonica.de

Bitte finden Sie hier die
handelsrechtlichen Pflichtangaben: http://www.telefonica.de/pflichtangaben.html


Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by "jp.belanger" <jp...@gmail.com>.
Sweet, thanks for the heads-up. Gonna try that when I get a chance to
upgrade.


Gary Tully wrote:
> 
> belated but I think 5.4 will help, or a current snapshot, details in
> https://issues.apache.org/activemq/browse/AMQ-2670
> 

-- 
View this message in context: http://old.nabble.com/XAResourceRecovery-for-ActiveMQ-on-JBoss-tp24933498p28083212.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by Gary Tully <ga...@gmail.com>.
belated but I think 5.4 will help, or a current snapshot, details in
https://issues.apache.org/activemq/browse/AMQ-2670

On 18 December 2009 16:28, jp.belanger <jp...@gmail.com> wrote:

>
> From what I can see from my use, is the fact that the XARessource not being
> Serializable, the Recovery engine of JBoss fails reacquire the context for
> Transaction recovery.
>
> I tried using a custom Transaction recovery based on the JBossMQ one.
> (MessagingXAResourceWrapper and MessagingXAResourceRecovery)
>
> But the RA doesn't return a XAConnectionFactory. So I kinda get stuck
> there.
>
>
>
> Andreas Gies wrote:
> >
> > Hi there,
> >
> > I am working on some JBoss integration as well. I don't understand the
> > comment on
> > "making the RA XA compatible". At the end of the day it depends on hon
> how
> > you do the
> > transaction management and define the connection factories.
> >
> > A non-tx-connection-factory defined in the jboss-ds does not support
> > transactions, a
> > tx-connection without the xa-transaction element does only support local
> > transactions,
> > a tx-connection with the xa-connection element support local and
> > xa-transactions.
> >
> > As far as I am reading the code correctly, the RA recognizes the
> > transaction context correctly
> > and encapsulates local AND xa transactions in
> > org.apacheactivemq.TransactionContext.
> >
> > I *think* you only need to use the XA capable connection factory if you
> > want to register the
> > CF manually and not have the RA do the transaction management. So, either
> > you are using the
> > RA with the correct definition in the ds-definition file OR you are using
> > a XA capable CF.
> >
> > Could you elaborate a bit on your use case in case I am missing
> something,
> > perhaps there is
> > a test case to try ?
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/XAResourceRecovery-for-ActiveMQ-on-JBoss-tp24933498p26845042.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by "jp.belanger" <jp...@gmail.com>.
>From what I can see from my use, is the fact that the XARessource not being
Serializable, the Recovery engine of JBoss fails reacquire the context for
Transaction recovery.

I tried using a custom Transaction recovery based on the JBossMQ one.
(MessagingXAResourceWrapper and MessagingXAResourceRecovery)

But the RA doesn't return a XAConnectionFactory. So I kinda get stuck there.



Andreas Gies wrote:
> 
> Hi there, 
> 
> I am working on some JBoss integration as well. I don't understand the
> comment on 
> "making the RA XA compatible". At the end of the day it depends on hon how
> you do the 
> transaction management and define the connection factories. 
> 
> A non-tx-connection-factory defined in the jboss-ds does not support
> transactions, a 
> tx-connection without the xa-transaction element does only support local
> transactions, 
> a tx-connection with the xa-connection element support local and
> xa-transactions.
> 
> As far as I am reading the code correctly, the RA recognizes the
> transaction context correctly
> and encapsulates local AND xa transactions in
> org.apacheactivemq.TransactionContext.
> 
> I *think* you only need to use the XA capable connection factory if you
> want to register the 
> CF manually and not have the RA do the transaction management. So, either
> you are using the 
> RA with the correct definition in the ds-definition file OR you are using
> a XA capable CF.
> 
> Could you elaborate a bit on your use case in case I am missing something,
> perhaps there is 
> a test case to try ?
> 
> 

-- 
View this message in context: http://old.nabble.com/XAResourceRecovery-for-ActiveMQ-on-JBoss-tp24933498p26845042.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by Andreas Gies <an...@soa-knowledge.net>.
Hi there, 

I am working on some JBoss integration as well. I don't understand the comment on 
"making the RA XA compatible". At the end of the day it depends on hon how you do the 
transaction management and define the connection factories. 

A non-tx-connection-factory defined in the jboss-ds does not support transactions, a 
tx-connection without the xa-transaction element does only support local transactions, 
a tx-connection with the xa-connection element support local and xa-transactions.

As far as I am reading the code correctly, the RA recognizes the transaction context correctly
and encapsulates local AND xa transactions in org.apacheactivemq.TransactionContext.

I *think* you only need to use the XA capable connection factory if you want to register the 
CF manually and not have the RA do the transaction management. So, either you are using the 
RA with the correct definition in the ds-definition file OR you are using a XA capable CF.

Could you elaborate a bit on your use case in case I am missing something, perhaps there is 
a test case to try ?


Best regards
Andreas

On Dec 9, 2009, at 4:27 PM, jp.belanger wrote:

> 
> 
> rajdavies wrote:
>> 
>> 
>> On 5 Nov 2009, at 05:58, Roland T. Lichti wrote:
>> 
>>> I'm willing to do try it - but only if there is a chance to get it  
>>> back
>>> into SVN (I don't need to be the committer, somebody may check my code
>>> and even refuse it if it is not up to the standards). But if the  
>>> idea of
>>> a full XA compatible RA is not wanted by the core team, it is not  
>>> worth
>>> the time to code it ...
>>> 
>>> bye,
>>>   Roland
>> 
>> Hi Roland,
>> 
>> would love to get the contribution!
>> 
>> cheers,
>> 
>> Rob
>> 
>> 
> 
> Anything new on this topic?
> 
> I'm having transaction recovery problem in my production environment and
> it's getting bad.
> 
> I've tried making the RA adapter XA compatible but most of the Managed and
> proxy object don't fit very well with the XA versions of Connection,
> XASession and such. And lack the knowledge of the inner working of ActiveMQ
> to do this in a reasonable time.
> 
> -- 
> View this message in context: http://old.nabble.com/XAResourceRecovery-for-ActiveMQ-on-JBoss-tp24933498p26712047.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 


Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by Gary Tully <ga...@gmail.com>.
Do you have some broken test case? It would be great to have some concrete
examples of what does not work atm.

2009/12/9 jp.belanger <jp...@gmail.com>

>
>
> rajdavies wrote:
> >
> >
> > On 5 Nov 2009, at 05:58, Roland T. Lichti wrote:
> >
> >> I'm willing to do try it - but only if there is a chance to get it
> >> back
> >> into SVN (I don't need to be the committer, somebody may check my code
> >> and even refuse it if it is not up to the standards). But if the
> >> idea of
> >> a full XA compatible RA is not wanted by the core team, it is not
> >> worth
> >> the time to code it ...
> >>
> >> bye,
> >>    Roland
> >
> > Hi Roland,
> >
> > would love to get the contribution!
> >
> > cheers,
> >
> > Rob
> >
> >
>
> Anything new on this topic?
>
> I'm having transaction recovery problem in my production environment and
> it's getting bad.
>
> I've tried making the RA adapter XA compatible but most of the Managed and
> proxy object don't fit very well with the XA versions of Connection,
> XASession and such. And lack the knowledge of the inner working of ActiveMQ
> to do this in a reasonable time.
>
> --
> View this message in context:
> http://old.nabble.com/XAResourceRecovery-for-ActiveMQ-on-JBoss-tp24933498p26712047.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by "jp.belanger" <jp...@gmail.com>.

rajdavies wrote:
> 
> 
> On 5 Nov 2009, at 05:58, Roland T. Lichti wrote:
> 
>> I'm willing to do try it - but only if there is a chance to get it  
>> back
>> into SVN (I don't need to be the committer, somebody may check my code
>> and even refuse it if it is not up to the standards). But if the  
>> idea of
>> a full XA compatible RA is not wanted by the core team, it is not  
>> worth
>> the time to code it ...
>>
>> bye,
>>    Roland
> 
> Hi Roland,
> 
> would love to get the contribution!
> 
> cheers,
> 
> Rob
> 
> 

Anything new on this topic?

I'm having transaction recovery problem in my production environment and
it's getting bad.

I've tried making the RA adapter XA compatible but most of the Managed and
proxy object don't fit very well with the XA versions of Connection,
XASession and such. And lack the knowledge of the inner working of ActiveMQ
to do this in a reasonable time.

-- 
View this message in context: http://old.nabble.com/XAResourceRecovery-for-ActiveMQ-on-JBoss-tp24933498p26712047.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: XAResourceRecovery for ActiveMQ on JBoss

Posted by Rob Davies <ra...@gmail.com>.
On 5 Nov 2009, at 05:58, Roland T. Lichti wrote:

> Hi Scott,
>
> Scott McNab schrieb:
>
> We have the same problem. I just checked the source of the RA and  
> found
> some not so nice information.
>
> 1. ActiveMQ has XA support.
> 2. The ActiveMQ RA does encapsulate it from the API. Every layer again
> works only with the non-XA-versions of session, connection, ...
>
> Therefore to get the XAConnectionFactory bound to JNDI a complete
> rewrite of the RA is needed. Some concepts may be
> even incompatible with that idea (like using the inbound session for
> everything else).
>
> I'm willing to do try it - but only if there is a chance to get it  
> back
> into SVN (I don't need to be the committer, somebody may check my code
> and even refuse it if it is not up to the standards). But if the  
> idea of
> a full XA compatible RA is not wanted by the core team, it is not  
> worth
> the time to code it ...
>
> bye,
>    Roland
>
> -- 
> Roland Thomas Lichti
> IT Application Manager
>
> Telefónica o2 Germany GmbH & Co. OHG
> Hülshorstweg 30, 33415 Verl
> t: +49 5246 80 1121, f: +49 5246 80 2121
> roland.lichti@telefonica.de
> http://www.telefonica.de
>
> Bitte finden Sie hier die
> handelsrechtlichen Pflichtangaben: http://www.telefonica.de/pflichtangaben.html
>


Hi Roland,

would love to get the contribution!

cheers,

Rob

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/