You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Frank Herrmann <fr...@modernizingmedicine.com> on 2016/09/20 13:30:08 UTC

Cayenne with Transaction Manager (Atomikos)

Hello all,

I was wondering if anyone has had any experience using a transaction
manager with Cayenne. Currently, we use Bitronix with a lot of custom,
buggy, code wrapped around it. We are in the process of switching to
Atomikos. Does anyone have an advice, or better an example, of integrating
Cayenne with Atomikos (or other transaction manager)?

Thanks in advance.

-Frank

-- 
FRANK HERRMANN
SENIOR SOFTWARE ENGINEER

T: 561-880-2998 x1563

E: frank.herrmann@modmed.com



[image: [ Modernizing Medicine ]] <http://www.modmed.com/>
[image: [ Facebook ]] <http://www.facebook.com/modernizingmedicine> [image:
[ LinkedIn ]] <http://www.linkedin.com/company/modernizing-medicine/> [image:
[ YouTube ]] <http://www.youtube.com/user/modernizingmedicine> [image: [
Twitter ]] <https://twitter.com/modmed_EMA> [image: [ Blog ]]
<http://www.modmed.com/BlogBeyondEMR> [image: [ Instagram ]]
<http://instagram.com/modernizing_medicine>

Re: Cayenne with Transaction Manager (Atomikos)

Posted by Frank Herrmann <fr...@modernizingmedicine.com>.
Thanks Andrus. Fortunately, even with Bitronix, we created a custom
SpringDataSourceFactor for Cayenne that allows Cayenne to participate in a
Spring managed transaction. It looks like that will service me as well for
Atomikos, since Spring is handling the transaction, not Cayenne. I'll let
you know how it works out.

-Frank

On Thu, Sep 22, 2016 at 8:08 PM, Andrus Adamchik <an...@objectstyle.org>
wrote:

> Hi Frank,
>
> As you see, with a few exceptions, Cayenne community just delegates
> transactions to Cayenne and rarely cares about external tx manager. At the
> same time we are quietly improving public transaction API in Cayenne, and I
> am interested to see how that works Atomikos and other tx managers. Please
> keep the list posted on how that goes, and if we can change anything in
> Cayenne to make the integration more seamless, let's discuss on dev@.
>
> Thanks,
> Andrus
>
>
> > On Sep 20, 2016, at 9:30 AM, Frank Herrmann <frank.herrmann@
> modernizingmedicine.com> wrote:
> >
> > Hello all,
> >
> > I was wondering if anyone has had any experience using a transaction
> > manager with Cayenne. Currently, we use Bitronix with a lot of custom,
> > buggy, code wrapped around it. We are in the process of switching to
> > Atomikos. Does anyone have an advice, or better an example, of
> integrating
> > Cayenne with Atomikos (or other transaction manager)?
> >
> > Thanks in advance.
> >
> > -Frank
> >
> > --
> > FRANK HERRMANN
> > SENIOR SOFTWARE ENGINEER
> >
> > T: 561-880-2998 x1563
> >
> > E: frank.herrmann@modmed.com
> >
> >
> >
> > [image: [ Modernizing Medicine ]] <http://www.modmed.com/>
> > [image: [ Facebook ]] <http://www.facebook.com/modernizingmedicine>
> [image:
> > [ LinkedIn ]] <http://www.linkedin.com/company/modernizing-medicine/>
> [image:
> > [ YouTube ]] <http://www.youtube.com/user/modernizingmedicine> [image: [
> > Twitter ]] <https://twitter.com/modmed_EMA> [image: [ Blog ]]
> > <http://www.modmed.com/BlogBeyondEMR> [image: [ Instagram ]]
> > <http://instagram.com/modernizing_medicine>
>
>


-- 
FRANK HERRMANN
SENIOR SOFTWARE ENGINEER

T: 561-880-2998 x1563

E: frank.herrmann@modmed.com



[image: [ Modernizing Medicine ]] <http://www.modmed.com/>
[image: [ Facebook ]] <http://www.facebook.com/modernizingmedicine> [image:
[ LinkedIn ]] <http://www.linkedin.com/company/modernizing-medicine/> [image:
[ YouTube ]] <http://www.youtube.com/user/modernizingmedicine> [image: [
Twitter ]] <https://twitter.com/modmed_EMA> [image: [ Blog ]]
<http://www.modmed.com/BlogBeyondEMR> [image: [ Instagram ]]
<http://instagram.com/modernizing_medicine>

Re: Cayenne with Transaction Manager (Atomikos)

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Frank,

As you see, with a few exceptions, Cayenne community just delegates transactions to Cayenne and rarely cares about external tx manager. At the same time we are quietly improving public transaction API in Cayenne, and I am interested to see how that works Atomikos and other tx managers. Please keep the list posted on how that goes, and if we can change anything in Cayenne to make the integration more seamless, let's discuss on dev@.

Thanks,
Andrus


> On Sep 20, 2016, at 9:30 AM, Frank Herrmann <fr...@modernizingmedicine.com> wrote:
> 
> Hello all,
> 
> I was wondering if anyone has had any experience using a transaction
> manager with Cayenne. Currently, we use Bitronix with a lot of custom,
> buggy, code wrapped around it. We are in the process of switching to
> Atomikos. Does anyone have an advice, or better an example, of integrating
> Cayenne with Atomikos (or other transaction manager)?
> 
> Thanks in advance.
> 
> -Frank
> 
> -- 
> FRANK HERRMANN
> SENIOR SOFTWARE ENGINEER
> 
> T: 561-880-2998 x1563
> 
> E: frank.herrmann@modmed.com
> 
> 
> 
> [image: [ Modernizing Medicine ]] <http://www.modmed.com/>
> [image: [ Facebook ]] <http://www.facebook.com/modernizingmedicine> [image:
> [ LinkedIn ]] <http://www.linkedin.com/company/modernizing-medicine/> [image:
> [ YouTube ]] <http://www.youtube.com/user/modernizingmedicine> [image: [
> Twitter ]] <https://twitter.com/modmed_EMA> [image: [ Blog ]]
> <http://www.modmed.com/BlogBeyondEMR> [image: [ Instagram ]]
> <http://instagram.com/modernizing_medicine>


Re: Cayenne with Transaction Manager (Atomikos)

Posted by Frank Herrmann <fr...@modernizingmedicine.com>.
Currently we have Bitronix. However, Bitronix hasn't been updated in years
and is dead as a project. We need transaction management because we write
to both a database and a JMS queue (ActiveMQ). We have existing custom code
to allow Cayenne to participate in a Spring managed transaction. I was just
reaching out to see if anyone else has done something similar. We have a
lot of code wrapped around Bitronix to second guess whether to use a local
or global transaction. Most of this functionality is built into Atomikos,
so I have to unravel the code in our system. Basically, I'm covering all my
bases while doing my research into the best approach.



On Tue, Sep 20, 2016 at 7:20 PM, Aristedes Maniatis <ar...@maniatis.org>
wrote:

> On 20/09/2016 11:30pm, Frank Herrmann wrote:
> > Hello all,
> >
> > I was wondering if anyone has had any experience using a transaction
> > manager with Cayenne. Currently, we use Bitronix with a lot of custom,
> > buggy, code wrapped around it. We are in the process of switching to
> > Atomikos. Does anyone have an advice, or better an example, of
> integrating
> > Cayenne with Atomikos (or other transaction manager)?
>
>
> I can't answer your question because I've never needed such a setup (or
> maybe I have but didn't know it), but I'm curious about your design choices
> and what it gives you. Are you running two separate databases and using the
> transaction manager to write to both of them, or are you using a
> transaction manager to synchronise a memory cache across your application
> cluster? If the latter, then would Terracotta work for you?
>
> What sort of high availability problem does Atomikos solve?
>
> Cheers
> Ari
>
>
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>



-- 
FRANK HERRMANN
SENIOR SOFTWARE ENGINEER

T: 561-880-2998 x1563

E: frank.herrmann@modmed.com



[image: [ Modernizing Medicine ]] <http://www.modmed.com/>
[image: [ Facebook ]] <http://www.facebook.com/modernizingmedicine> [image:
[ LinkedIn ]] <http://www.linkedin.com/company/modernizing-medicine/> [image:
[ YouTube ]] <http://www.youtube.com/user/modernizingmedicine> [image: [
Twitter ]] <https://twitter.com/modmed_EMA> [image: [ Blog ]]
<http://www.modmed.com/BlogBeyondEMR> [image: [ Instagram ]]
<http://instagram.com/modernizing_medicine>

Re: Cayenne with Transaction Manager (Atomikos)

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 20/09/2016 11:30pm, Frank Herrmann wrote:
> Hello all,
> 
> I was wondering if anyone has had any experience using a transaction
> manager with Cayenne. Currently, we use Bitronix with a lot of custom,
> buggy, code wrapped around it. We are in the process of switching to
> Atomikos. Does anyone have an advice, or better an example, of integrating
> Cayenne with Atomikos (or other transaction manager)?


I can't answer your question because I've never needed such a setup (or maybe I have but didn't know it), but I'm curious about your design choices and what it gives you. Are you running two separate databases and using the transaction manager to write to both of them, or are you using a transaction manager to synchronise a memory cache across your application cluster? If the latter, then would Terracotta work for you?

What sort of high availability problem does Atomikos solve?

Cheers
Ari



-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A