felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com.INVALID>
Subject Re: Managing transactions in iPOJO or OSGi component
Date Wed, 25 May 2016 20:59:44 GMT
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 <ngocthobkdn@gmail.com> 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 <ngocthobkdn@gmail.com>:
> 
>> i'm sorry i have not finished my message in this mail
>> 
>> 2016-05-25 21:09 GMT+02:00 tho huynh ngoc <ngocthobkdn@gmail.com>:
>> 
>>> 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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message