activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anish pathadan" <anishpatha...@gmail.com>
Subject Re: Help! Unable to send messages to activemq from an XA transaction
Date Tue, 25 Sep 2007 13:04:15 GMT
Hi
   The problem happens only if I use an external XA datasource.I used XA
datasource created in geronimo.This datasource is set inthe Persistence
adapter factory before starting the brokerservice.
It seems that Activemq doesn't recognise it as an XA datasource and tries to
set autocommit to true in TransactionContext. I think the problem can be
solved if I can somehow know whether the transaction is XA or not in
org.apache.activemq.store.jdbc.TransactionContext.
The question is how can I know that???. Or is there any other better way to
solve it?


On 9/20/07, anish pathadan <anishpathadan@gmail.com> wrote:

> Hi Hiram,
> Thanks for that info.I used the default derby database.I will try creating
> an XA datasouce and using it.
>
> On 9/20/07, Hiram Chirino <hiram@hiramchirino.com> wrote:
> >
> > How did you configure the ActiveMQ datasource?  It's data source
> > should be setup as an XA datasource.
> >
> > On 9/20/07, anish pathadan <anishpathadan@gmail.com> wrote:
> > > Hi All,
> > >        I am trying to send messages to active mq within an XA
> > transaction. I
> > > used jdbc persistence and VM connector. When tried to send message I
> > am
> > > getting an error "unable to set autocommit on within an XA
> > > transaction". This is what I find out after the analysis.
> > >
> > > org.apache.activemq.store.jdbc.TransactionContext's getConnection()
> > and
> > > close() methods tries to set autocommit ON on the jdbc connection.
> > This will
> > > cause the above said exception because getConnection() and close()
> > method is
> > > called within an XA transaction. There is check in this method to see
> > > whether the method is called within a transaction or not. But the
> > variable
> > > is having incorrect value when called within an XA transaction.
> > >
> > > My question is how can I determine whether the method is called within
> > an XA
> > > transaction or not?. Or is there any otherway to solve this issue?
> > > Best Regards,
> > > Anish Pathadan
> > >
> >
> >
> > --
> > Regards,
> > Hiram
> >
> > Blog: http://hiramchirino.com
> >
>
>
>
> --
> Best Regards,
> Anish Pathadan




-- 
Best Regards,
Anish Pathadan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message