Hi,

For me, i define transaction as follows

a local transaction is a set of continuous actions on a component.
a global transaction is a set of local transactions through components.

For example before sending a message to receiver (e.g. component B), client
(e.g. component A) needs to send the message to a compression component
(e.g. component C) for compressing. To do that, A initiates a local
transaction (T1) that consists of actions as sending msg to C, receiving
the compressed message, and then sending it to B.

On the C, when receiving the message, it initiates its own local
transaction (T2) that consists of actions such as compressing the message
and returing the compressed message.

A global transaction in this example consists of T1 and T2.

I want to implement a manager component to know how many T2 have been
finished and when a transaction T2 is initiated or finished, etc.

In fact, i want to find a solution for OSGi, iPOJO component model like
http://jotm.objectweb.org/jironde.html (for Fractal component model).

Thank you for your help.

HNT,








2016-05-25 23:46 GMT+02:00 <[email protected]>:

> Hello,
>
> If this is oracle speach then "local transaction" means a JDBC connection
> with a explicite .commit(), a "global transaction" will use XA transactions
> (commit via Resource) and a managed transaction is a context where you have
> a container beeing responsible for preparing and committing (can be local
> or global).
>
> Bernd
>
> --
> http://bernd.eckenfels.net
>
> -----Original Message-----
> From: David Jencks <[email protected]>
> To: [email protected]
> Sent: Mi., 25 Mai 2016 23:40
> Subject: Re: Managing transactions in iPOJO or OSGi component
>
> I don’t understand what you mean by “transaction”, “local transaction”,
> “global transaction” or “manage transactions”.  Does your usage of these
> terms have any relationship with other established uses of (some of) them
> such as the XA transaction spec?  What properties do you want these
> transactions to have?
>
> thanks
> david jencks
>
> > On May 25, 2016, at 1:23 PM, tho huynh ngoc <[email protected]>
> wrote:
> >
> > Hi,
> >
> >
> > I define a transaction is a set of continuous activities (one method or
> set
> > of methods) in a component.
> >
> > I wrote a simple example as follows:
> >
> > //service interfacepublic interface Hello {
> >    String sayHello(String name);
> >    String sayBonjour(String name);}
> > //service implementation @Componentpublic class HelloImpl implements
> Hello {
> >
> >    public String sayHello(String name) {
> >       //start local transaction
> >       return "hello " + name;
> >       //finish local transaction
> >    }
> >    public String sayBonjour(String name) {
> >       //start local transaction
> >       return "bonjour " + name;
> >       //finish local transaction
> >    }}
> > //client@Componentpublic class Client {
> >
> >   Hello client;
> >   public Client() {
> >      //start local transaction
> >      client.sayHello("world");
> >      client.sayBonjour("le monde");
> >      //finish local transaction
> >   }
> >  }
> >
> > In this example, there are local transactions in the components HelloImpl
> > and Client. I define that global transaction of the system consists of a
> > set of local transactions through all components.
> >
> > How to manage transactions (global transaction and the local transtions
> in
> > this example) in OSGi or iPOJO ?
> >
> > Thank you for your response
> >
> > Regards,
> >
> >
> > 2016-05-25 21:12 GMT+02:00 tho huynh ngoc <[email protected]>:
> >
> >> i'm sorry i have not finished my message in this mail
> >>
> >> 2016-05-25 21:09 GMT+02:00 tho huynh ngoc <[email protected]>:
> >>
> >>> Hi,
> >>>
> >>> I define a transaction is a set of continuous activities (one method or
> >>> set of methods) in a component.
> >>>
> >>> I wrote a simple example as follows:
> >>>
> >>> //service interface
> >>> public interface Hello {
> >>>    String sayHello(String name);
> >>> }
> >>>
> >>> //implementation service
> >>> @Component
> >>> public class HelloImpl implements Hello {   public HelloImpl() {
> >>>        System.out.print("start Hello implementation");
> >>>    }
> >>>
> >>>    public String sayHello(String name) { return "hello " + name;  }
> >>> }
> >>>
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to