[mule-user] XA Transaction with Spring, Mule+ActiveMQ, Hibernate+MySql and Atomikos

1 view
Skip to first unread message

krv

unread,
Aug 22, 2008, 12:30:57 PM8/22/08
to us...@mule.codehaus.org

I have a very simple app which does this :

open an xa tx
insert into db
enqueue in mule (with activemq underneath)
update db that i successfuly enqueued
close the xa tx


What i observe from the logs is :

first db update goes thro fine
enqueue also goes thro fine (of course it doesn't reflect in the ActiveMQ
web UI)
second db update also goes thro fine

but ..... just before the function returns (kicking off spring's tx close
part) I get this :

[org.mule.impl.DefaultExceptionStrategy]- Caught exception in Exception
Strategy: Session's XAResource has not been enlisted in a distributed
transaction.
javax.jms.JMSException: Session's XAResource has not been enlisted in a
distributed transaction.
at
org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109)

Unsure why this is happening when the xa tx actually has committed the DB
tx. If the exception occured should'nt the Db tx rollback ? Probably not
because MuleClient caches the msg which goes thro fine and another thread
(the MuleDispatcher thread ?) actually picks this up and this is causing the
exception ???

Either way not sure why my config is not working. I have attached my app
context file. Would appreciate if anyone could provide some pointers. Also I
have configured my Spring’s Hibernate sessionFactory to support an XA tx.
Hopefully this is correct ???

http://www.nabble.com/file/p19110826/application-context.xml
application-context.xml
http://www.nabble.com/file/p19110826/messaging-util-applicationContext.xml
messaging-util-applicationContext.xml

-Vivek
--
View this message in context: http://www.nabble.com/XA-Transaction-with-Spring%2C-Mule%2BActiveMQ%2C-Hibernate%2BMySql-and-Atomikos-tp19110826p19110826.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Antoine Borg

unread,
Aug 25, 2008, 4:50:43 AM8/25/08
to us...@mule.codehaus.org
Hi ..

Check out this JIRA: http://mule.mulesource.org/jira/browse/MULE-3322

JDBC does not support XA transactions in Mule 2 - which version of Mule are
you using?

Regards

Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com

krv

unread,
Aug 25, 2008, 8:56:50 AM8/25/08
to us...@mule.codehaus.org

We're currently using Mule-1.4.4 but are looking forward to use Mule-2.0. I
hope the issue will be resolve soon :-).

Regards,
Vivek


antoine.borg wrote:
>
> Hi ..
>
> Check out this JIRA: http://mule.mulesource.org/jira/browse/MULE-3322
>
> JDBC does not support XA transactions in Mule 2 - which version of Mule
> are
> you using?
>
> Regards
>
> Antoine Borg, Senior Consultant | Tel: +32 28 504 696
> ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
> email: antoin...@ricston.com | blog: blog.ricston.com | web:
> ricston.com
>
> -----Original Message-----
> From: krv [mailto:vivek....@onmobile.com]
> Sent: Friday, August 22, 2008 6:31 PM
> To: us...@mule.codehaus.org
> Subject: [mule-user] XA Transaction with Spring, Mule+ActiveMQ,
> Hibernate+MySql and Atomikos
>
>

--
View this message in context: http://www.nabble.com/XA-Transaction-with-Spring%2C-Mule%2BActiveMQ%2C-Hibernate%2BMySql-and-Atomikos-tp19110826p19143385.html

krv

unread,
Aug 25, 2008, 10:04:59 AM8/25/08
to us...@mule.codehaus.org

The previous reply was not posted hence reposting...

Antoine Borg

unread,
Aug 26, 2008, 2:43:27 AM8/26/08
to us...@mule.codehaus.org
Hi Vivek,

If you are using 1.4.4, then the transaction should work - what transaction
manager do you use and how is it configured in Mule?

Antoine

Regards,
Vivek

> .xml messaging-util-applicationContext.xml


>
> -Vivek
> --
> View this message in context:
> http://www.nabble.com/XA-Transaction-with-Spring%2C-Mule%2BActiveMQ%2C

> -Hiber nate%2BMySql-and-Atomikos-tp19110826p19110826.html

Reply all
Reply to author
Forward
0 new messages