You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Timothy Ward <ti...@hotmail.com> on 2016/02/12 10:23:27 UTC

OSGi transaction management (RFC-221)

Hi all,

I’m working on a new RFC with the OSGi Alliance which is about easily controlling transactions within OSGi components. Obviously Aries Blueprint has its own model for doing this, but other models, such as Declarative Services (or just raw OSGi) get no help at all. There are also issues with using proxies for transactions - internal method calls don’t breach the proxy boundary and so don’t trigger the transaction behaviours.

Another problem that regularly comes up on the user lists is that it’s relatively difficult to be sure that the DataSource/EntityManager/xxx you’re using is really participating in the transaction. There are a number of whiteboard enlisting solutions around, but it’s still easy to pick up the wrong service, or just to forget that you need the enlistment at all.

I’m proposing to do the prototyping work for this RFC in Aries, with the thought that we can provide the Reference Implementation at some point. 

I would also like to add that the impetus for this work comes from McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/>), who are generously sponsoring my time for this development effort and Open Source contribution.

Regards,

Tim

P.S. The RFC document is available on GitHub here - https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf>



Re: OSGi transaction management (RFC-221)

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Tim,

I fully support your work there. So if I can help with it just say so.

Christian

On 12.02.2016 10:23, Timothy Ward wrote:
> Hi all,
>
> I’m working on a new RFC with the OSGi Alliance which is about easily controlling transactions within OSGi components. Obviously Aries Blueprint has its own model for doing this, but other models, such as Declarative Services (or just raw OSGi) get no help at all. There are also issues with using proxies for transactions - internal method calls don’t breach the proxy boundary and so don’t trigger the transaction behaviours.
>
> Another problem that regularly comes up on the user lists is that it’s relatively difficult to be sure that the DataSource/EntityManager/xxx you’re using is really participating in the transaction. There are a number of whiteboard enlisting solutions around, but it’s still easy to pick up the wrong service, or just to forget that you need the enlistment at all.
>
> I’m proposing to do the prototyping work for this RFC in Aries, with the thought that we can provide the Reference Implementation at some point.
>
> I would also like to add that the impetus for this work comes from McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/>), who are generously sponsoring my time for this development effort and Open Source contribution.
>
> Regards,
>
> Tim
>
> P.S. The RFC document is available on GitHub here - https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf>
>
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: OSGi transaction management (RFC-221)

Posted by da...@apache.org.
Hi Tim,

On 12 February 2016 at 09:23, Timothy Ward <ti...@hotmail.com> wrote:

> Hi all,
>
> <snip/>
>
> I’m proposing to do the prototyping work for this RFC in Aries, with the
> thought that we can provide the Reference Implementation at some point.
>

Sounds good to me!


> I would also like to add that the impetus for this work comes from
> McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/>), who are
> generously sponsoring my time for this development effort and Open Source
> contribution.
>
> Really? Well, it's interesting to know that Aries is being used in 'Meat
Processing Software'.

Best regards,

David

Re: OSGi transaction management (RFC-221)

Posted by David Bosschaert <da...@gmail.com>.
Hi Matthew,

Thanks for the input! There are two ways of feeding back input in the OSGi
specification process:

1. You'll find a public feedback mechanism described at the bottom of this
page: https://github.com/osgi/design

2. If you would like to be more directly involved in the creation of this
(or other) OSGi specification, your company can join the OSGi Alliance, see
https://www.osgi.org/join

Best regards,

David

On 29 February 2016 at 14:05, <Ma...@wellsfargo.com> wrote:

> Timothy,
>
> Thanks for the work on this, I'm looking forward to seeing this API. What
> is the best way to provide input - ideas and/or code - to the project?
> Currently my two major thoughts are:
>
> 1) After using lambda programming with transactions now for a few months,
> I'm particularly interested in seeing some formal FuntionalInterface types
> that declare and throw exceptions of the common transactional/JPA variety -
> including some checked ones that currently can't be thrown from normal
> Java8 Function types.
>
> 2) This may be impractical for the masses, but I'm also envisioning a
> method-chaining like API for doing transactional calls that lets code
> 'build-up' a transactional 'context' and then execute it via a single call.
> Code like [1] is what is in my head and perhaps others would like something
> like this too.
>
> Thanks,
> -matt
>
> [1]
> txControl.start().propagation(required()).do(em -> {}).do(em ->
> {}).execute();
>
> -----Original Message-----
> From: Timothy Ward [mailto:timothyjward@hotmail.com]
> Sent: Monday, February 15, 2016 1:32 PM
> To: dev@aries.apache.org
> Subject: Re: OSGi transaction management (RFC-221)
>
> Given the positive response I’ve started by creating an API project for
> the Transaction Control Service under tx-control, I’ll move on to a
> coordinator-based solution for local transactions next. Once enough of it
> is hanging together I’ll add it to the main build so that snapshots start
> appearing in maven.
>
> Regards,
>
> Tim
>
>
> > On 15 Feb 2016, at 13:30, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> >
> > +1
> >
> > Regards
> > JB
> >
> > On 02/12/2016 10:23 AM, Timothy Ward wrote:
> >> Hi all,
> >>
> >> I’m working on a new RFC with the OSGi Alliance which is about easily
> controlling transactions within OSGi components. Obviously Aries Blueprint
> has its own model for doing this, but other models, such as Declarative
> Services (or just raw OSGi) get no help at all. There are also issues with
> using proxies for transactions - internal method calls don’t breach the
> proxy boundary and so don’t trigger the transaction behaviours.
> >>
> >> Another problem that regularly comes up on the user lists is that it’s
> relatively difficult to be sure that the DataSource/EntityManager/xxx
> you’re using is really participating in the transaction. There are a number
> of whiteboard enlisting solutions around, but it’s still easy to pick up
> the wrong service, or just to forget that you need the enlistment at all.
> >>
> >> I’m proposing to do the prototyping work for this RFC in Aries, with
> the thought that we can provide the Reference Implementation at some point.
> >>
> >> I would also like to add that the impetus for this work comes from
> McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/> <
> http://mccarthy.co.nz/ <http://mccarthy.co.nz/>>), who are generously
> sponsoring my time for this development effort and Open Source contribution.
> >>
> >> Regards,
> >>
> >> Tim
> >>
> >> P.S. The RFC document is available on GitHub here -
> https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf
> <
> https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf>
> <
> https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf
> <
> https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf
> >>
> >>
> >>
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org <ma...@apache.org>
> > http://blog.nanthrax.net <http://blog.nanthrax.net/>
> > Talend - http://www.talend.com <http://www.talend.com/>
>

RE: OSGi transaction management (RFC-221)

Posted by Ma...@wellsfargo.com.
Timothy,

Thanks for the work on this, I'm looking forward to seeing this API. What is the best way to provide input - ideas and/or code - to the project? Currently my two major thoughts are:

1) After using lambda programming with transactions now for a few months, I'm particularly interested in seeing some formal FuntionalInterface types that declare and throw exceptions of the common transactional/JPA variety - including some checked ones that currently can't be thrown from normal Java8 Function types.

2) This may be impractical for the masses, but I'm also envisioning a method-chaining like API for doing transactional calls that lets code 'build-up' a transactional 'context' and then execute it via a single call. Code like [1] is what is in my head and perhaps others would like something like this too.

Thanks,
-matt

[1]
txControl.start().propagation(required()).do(em -> {}).do(em -> {}).execute();

-----Original Message-----
From: Timothy Ward [mailto:timothyjward@hotmail.com]
Sent: Monday, February 15, 2016 1:32 PM
To: dev@aries.apache.org
Subject: Re: OSGi transaction management (RFC-221)

Given the positive response I’ve started by creating an API project for the Transaction Control Service under tx-control, I’ll move on to a coordinator-based solution for local transactions next. Once enough of it is hanging together I’ll add it to the main build so that snapshots start appearing in maven.

Regards,

Tim


> On 15 Feb 2016, at 13:30, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>
> +1
>
> Regards
> JB
>
> On 02/12/2016 10:23 AM, Timothy Ward wrote:
>> Hi all,
>>
>> I’m working on a new RFC with the OSGi Alliance which is about easily controlling transactions within OSGi components. Obviously Aries Blueprint has its own model for doing this, but other models, such as Declarative Services (or just raw OSGi) get no help at all. There are also issues with using proxies for transactions - internal method calls don’t breach the proxy boundary and so don’t trigger the transaction behaviours.
>>
>> Another problem that regularly comes up on the user lists is that it’s relatively difficult to be sure that the DataSource/EntityManager/xxx you’re using is really participating in the transaction. There are a number of whiteboard enlisting solutions around, but it’s still easy to pick up the wrong service, or just to forget that you need the enlistment at all.
>>
>> I’m proposing to do the prototyping work for this RFC in Aries, with the thought that we can provide the Reference Implementation at some point.
>>
>> I would also like to add that the impetus for this work comes from McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/> <http://mccarthy.co.nz/ <http://mccarthy.co.nz/>>), who are generously sponsoring my time for this development effort and Open Source contribution.
>>
>> Regards,
>>
>> Tim
>>
>> P.S. The RFC document is available on GitHub here - https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf> <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf>>
>>
>>
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net <http://blog.nanthrax.net/>
> Talend - http://www.talend.com <http://www.talend.com/>

Re: OSGi transaction management (RFC-221)

Posted by Timothy Ward <ti...@hotmail.com>.
Given the positive response I’ve started by creating an API project for the Transaction Control Service under tx-control, I’ll move on to a coordinator-based solution for local transactions next. Once enough of it is hanging together I’ll add it to the main build so that snapshots start appearing in maven.

Regards,

Tim


> On 15 Feb 2016, at 13:30, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> +1
> 
> Regards
> JB
> 
> On 02/12/2016 10:23 AM, Timothy Ward wrote:
>> Hi all,
>> 
>> I’m working on a new RFC with the OSGi Alliance which is about easily controlling transactions within OSGi components. Obviously Aries Blueprint has its own model for doing this, but other models, such as Declarative Services (or just raw OSGi) get no help at all. There are also issues with using proxies for transactions - internal method calls don’t breach the proxy boundary and so don’t trigger the transaction behaviours.
>> 
>> Another problem that regularly comes up on the user lists is that it’s relatively difficult to be sure that the DataSource/EntityManager/xxx you’re using is really participating in the transaction. There are a number of whiteboard enlisting solutions around, but it’s still easy to pick up the wrong service, or just to forget that you need the enlistment at all.
>> 
>> I’m proposing to do the prototyping work for this RFC in Aries, with the thought that we can provide the Reference Implementation at some point.
>> 
>> I would also like to add that the impetus for this work comes from McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/> <http://mccarthy.co.nz/ <http://mccarthy.co.nz/>>), who are generously sponsoring my time for this development effort and Open Source contribution.
>> 
>> Regards,
>> 
>> Tim
>> 
>> P.S. The RFC document is available on GitHub here - https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf> <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf>>
>> 
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net <http://blog.nanthrax.net/>
> Talend - http://www.talend.com <http://www.talend.com/>

Re: OSGi transaction management (RFC-221)

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
+1

Regards
JB

On 02/12/2016 10:23 AM, Timothy Ward wrote:
> Hi all,
>
> I’m working on a new RFC with the OSGi Alliance which is about easily controlling transactions within OSGi components. Obviously Aries Blueprint has its own model for doing this, but other models, such as Declarative Services (or just raw OSGi) get no help at all. There are also issues with using proxies for transactions - internal method calls don’t breach the proxy boundary and so don’t trigger the transaction behaviours.
>
> Another problem that regularly comes up on the user lists is that it’s relatively difficult to be sure that the DataSource/EntityManager/xxx you’re using is really participating in the transaction. There are a number of whiteboard enlisting solutions around, but it’s still easy to pick up the wrong service, or just to forget that you need the enlistment at all.
>
> I’m proposing to do the prototyping work for this RFC in Aries, with the thought that we can provide the Reference Implementation at some point.
>
> I would also like to add that the impetus for this work comes from McCarthys (http://mccarthy.co.nz <http://mccarthy.co.nz/>), who are generously sponsoring my time for this development effort and Open Source contribution.
>
> Regards,
>
> Tim
>
> P.S. The RFC document is available on GitHub here - https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf <https://github.com/osgi/design/blob/master/rfcs/rfc0221/rfc-0221-TransactionControl.pdf>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com