You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Fladnag <fl...@zerezo.com> on 2013/03/29 12:53:16 UTC

Cannot rollback() inside an XASession with AMQ 5.6

Hi,

I have a very simple route in blueprint with 2 transactional endpoints (so,
no need of <transacted>) and I have a WARN log "Cannot rollback() inside an
XASession" all the time the route is up.

I have fully read
http://camel.465427.n5.nabble.com/OSGI-Transaction-Propagation-to-Camel-Route-td5619520i20.html
who talk about the same issue

I have also read https://issues.apache.org/jira/browse/AMQ-3251, and I
change my AMQ from 5.5.1 to 5.6.0 and after to 5.7.0 but without success.

Environment :
ServiceMix 4.4.2
Camel 2.8.5
AMQ 5.6.0 / 5.7.0
Aries 0.3
Spring 3.0.6

My blueprint file :



And the WARN log :


For my environment, I started with an SMX4.4.2, and update activemq to 5.7.0
manually with :



What's wrong in my configuration ? 
AMQ-3251 is really fixed in AMQ 5.6 ?

My blueprint file initialize the same beans as in 
https://github.com/muellerc/camel-in-transaction/blob/master/src/test/resources/META-INF/spring/JmsAndJdbcXATransactionSampleWithGeronimoTest-context.xml
but in blueprint context.

The difference I saw between my code and sample by Christian was some
versions
(https://github.com/muellerc/camel-in-transaction/blob/master/pom.xml)
Environment of muellerc :
Camel 2.10.1
AMQ 5.6.0
Aries 1.0.0
Spring 3.0.7

Which component I have to update if my file is correct ?




--
View this message in context: http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cannot rollback() inside an XASession with AMQ 5.6

Posted by Fladnag <fl...@zerezo.com>.
XA was needed in my real project (AMQ + BDD), the test case is just
simplified ;o)

I can try to upgrade camel, but it's a bit long and I (and my compagny)
prefer to use a stable distribution and not a patchwork of version never
tested together... but I will try.



--
View this message in context: http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081p5730085.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cannot rollback() inside an XASession with AMQ 5.6

Posted by Fladnag <fl...@zerezo.com>.
Ok, it works with AMQ 5.8.

But we can't use this version in our project (neither SMX 4.5.1 and camel
2.10.4 in fact).

Just for this simple test, I have to deal with some issues like 



probably due to bad dependencies like
https://issues.apache.org/jira/browse/CXF-4926, fixed last week : AMQ 5.8 is
too young for a stable version...

activemq-web-console for example was broken since 5.6 :
https://issues.apache.org/jira/browse/AMQ-3853 : bug in 5.6, fixed in 5.7
https://issues.apache.org/jira/browse/AMQ-4229 : bug in 5.7, unresolved

So, we will probably try to avoid using XA in our project :/

Thanks for you efforts




--
View this message in context: http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081p5730192.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cannot rollback() inside an XASession with AMQ 5.6

Posted by Christian Müller <ch...@gmail.com>.
With Camel 2.10.4 and ActiveMQ 5.7.0 I can reproduce the issue.
However, by using Camel 2.10.4 and ActiveMQ 5.8.0 everything works fine for
me. I updated my GitHub project [1]. Can you please verify whether you
still have the issue with these versions.

[1] https://github.com/muellerc/camel-in-transaction

Best,
Christian


On Fri, Mar 29, 2013 at 7:56 PM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Will try it in the next days...
>
> Sent from a mobile device
> Am 29.03.2013 16:08 schrieb "Fladnag" <fl...@zerezo.com>:
>
> > And can you use Camel 2.10.x? I will upgrade the examples to the latest
>> > Camel version in the next day...
>>
>> Same issue with this environment :
>> SMX 4.5.1
>> Camel 2.10.4
>> AMQ 5.7.0
>> Aries 0.3
>> Spring 3.0.7
>>
>> With a fresh download of SMX 4.5.1 distribution, I just doing that :
>> * Starting SMX
>> * osgi:list | grep Transaction
>> for found Aries Transaction Manager bundle id
>> * osgi:update <aries_bundle_id>
>> * copy my blueprint file to deploy
>>
>> The update of aries TM is necessary because without it, the bundle does
>> not
>> register org.springframework.transaction.PlatformTransactionManager
>> interface.
>> (Check with osgi:ls <aries_bundle_id>)
>>
>> In org.apache.aries.transaction.TransactionManagerService, the PlatformTM
>> is
>> registered only if we can construct a Spring transaction, but Spring
>> Transaction Manager start after aries... so it don't work at startup.
>>
>> The stack with this environment :
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081p5730089.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>

Re: Cannot rollback() inside an XASession with AMQ 5.6

Posted by Christian Müller <ch...@gmail.com>.
Will try it in the next days...

Sent from a mobile device
Am 29.03.2013 16:08 schrieb "Fladnag" <fl...@zerezo.com>:

> > And can you use Camel 2.10.x? I will upgrade the examples to the latest
> > Camel version in the next day...
>
> Same issue with this environment :
> SMX 4.5.1
> Camel 2.10.4
> AMQ 5.7.0
> Aries 0.3
> Spring 3.0.7
>
> With a fresh download of SMX 4.5.1 distribution, I just doing that :
> * Starting SMX
> * osgi:list | grep Transaction
> for found Aries Transaction Manager bundle id
> * osgi:update <aries_bundle_id>
> * copy my blueprint file to deploy
>
> The update of aries TM is necessary because without it, the bundle does not
> register org.springframework.transaction.PlatformTransactionManager
> interface.
> (Check with osgi:ls <aries_bundle_id>)
>
> In org.apache.aries.transaction.TransactionManagerService, the PlatformTM
> is
> registered only if we can construct a Spring transaction, but Spring
> Transaction Manager start after aries... so it don't work at startup.
>
> The stack with this environment :
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081p5730089.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Cannot rollback() inside an XASession with AMQ 5.6

Posted by Fladnag <fl...@zerezo.com>.
> And can you use Camel 2.10.x? I will upgrade the examples to the latest
> Camel version in the next day... 

Same issue with this environment :
SMX 4.5.1
Camel 2.10.4
AMQ 5.7.0
Aries 0.3
Spring 3.0.7

With a fresh download of SMX 4.5.1 distribution, I just doing that :
* Starting SMX
* osgi:list | grep Transaction
for found Aries Transaction Manager bundle id
* osgi:update <aries_bundle_id>
* copy my blueprint file to deploy

The update of aries TM is necessary because without it, the bundle does not
register org.springframework.transaction.PlatformTransactionManager
interface.
(Check with osgi:ls <aries_bundle_id>)

In org.apache.aries.transaction.TransactionManagerService, the PlatformTM is
registered only if we can construct a Spring transaction, but Spring
Transaction Manager start after aries... so it don't work at startup.

The stack with this environment :





--
View this message in context: http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081p5730089.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cannot rollback() inside an XASession with AMQ 5.6

Posted by Christian Müller <ch...@gmail.com>.
Why do you use XA? Because you only use one transactional resource, a
"normal" transaction is sufficient. I recommend to have a look at [1].

And can you use Camel 2.10.x? I will upgrade the examples to the latest
Camel version in the next day...

[1]
https://github.com/muellerc/camel-in-transaction/blob/master/src/test/resources/META-INF/spring/JmsTransactionSampleTest-context.xml

Best,
Christian

On Fri, Mar 29, 2013 at 12:53 PM, Fladnag <fl...@zerezo.com> wrote:

> Hi,
>
> I have a very simple route in blueprint with 2 transactional endpoints (so,
> no need of <transacted>) and I have a WARN log "Cannot rollback() inside an
> XASession" all the time the route is up.
>
> I have fully read
>
> http://camel.465427.n5.nabble.com/OSGI-Transaction-Propagation-to-Camel-Route-td5619520i20.html
> who talk about the same issue
>
> I have also read https://issues.apache.org/jira/browse/AMQ-3251, and I
> change my AMQ from 5.5.1 to 5.6.0 and after to 5.7.0 but without success.
>
> Environment :
> ServiceMix 4.4.2
> Camel 2.8.5
> AMQ 5.6.0 / 5.7.0
> Aries 0.3
> Spring 3.0.6
>
> My blueprint file :
>
>
>
> And the WARN log :
>
>
> For my environment, I started with an SMX4.4.2, and update activemq to
> 5.7.0
> manually with :
>
>
>
> What's wrong in my configuration ?
> AMQ-3251 is really fixed in AMQ 5.6 ?
>
> My blueprint file initialize the same beans as in
>
> https://github.com/muellerc/camel-in-transaction/blob/master/src/test/resources/META-INF/spring/JmsAndJdbcXATransactionSampleWithGeronimoTest-context.xml
> but in blueprint context.
>
> The difference I saw between my code and sample by Christian was some
> versions
> (https://github.com/muellerc/camel-in-transaction/blob/master/pom.xml)
> Environment of muellerc :
> Camel 2.10.1
> AMQ 5.6.0
> Aries 1.0.0
> Spring 3.0.7
>
> Which component I have to update if my file is correct ?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Cannot-rollback-inside-an-XASession-with-AMQ-5-6-tp5730081.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>