You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Marina Deslaugiers <ma...@orange-ftgroup.com> on 2008/10/08 20:17:34 UTC

Re: multiple instances of component implementation leadinf to loss of variables initialization

Hi Simon,

Thank you very much for your help.

Indeed, I am happy with a single component instance so your proposal  
to set the scope of the component to be "composite" is appropriate  
and it works well.

Unless I have missed the information while reading, I did not notice  
the scope concept in the SCA Assembly Model specification.When you  
gave me the information in the previous mail I searched for in the  
various SCA specification documents and finally found explanations in  
SCA Java Common Annotations and APIs.

Does the scope concept only concerns SCA runtime for Java ?

Best regards,
Marina.


Le 7 oct. 08 à 16:09, Simon Laws a écrit :

>
>
> On Tue, Oct 7, 2008 at 12:59 PM, Marina Deslaugiers  
> <ma...@orange-ftgroup.com> wrote:
> Hi,
>
> I am currently dvelopping a demo using Tuscany 1.1 incubating. In  
> the prototype we use an (non SCA, remote) external (graphical)  
> client that connects to a SCA component using RMI naming.lookup  
> (binding.rmi in the composite file) then we invoke two successive  
> operations on the retrieved interface.
> We run up against a problem: the (component) implementation  
> instance is different for each of the operation invocation  
> consequently we loose variables initialization made in the first  
> operation invocation resulting in immediate execution exception.
> Is there any way (configuration, customizing or other) to save the  
> state say, save / retrieve the first implementation instance  
> created that we need ?
>
> Regards,
> Marina Deslaugiers
>
>
> Hi Marina
>
> Is there some kind of session going on or are you happy with having  
> a single component instance for all requests. If the latter you  
> could set the scope of your component to be composite - @Scope 
> ("COMPOSITE").
>
> Simon


Re: multiple instances of component implementation leadinf to loss of variables initialization

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Oct 8, 2008 at 7:17 PM, Marina Deslaugiers <
marina.deslaugiers@orange-ftgroup.com> wrote:

> Hi Simon,
> Thank you very much for your help.
>
> Indeed, I am happy with a single component instance so your proposal to set
> the scope of the component to be "composite" is appropriate and it works
> well.
>
> Unless I have missed the information while reading, I did not notice the
> scope concept in the SCA Assembly Model specification.When you gave me the
> information in the previous mail I searched for in the various SCA
> specification documents and finally found explanations in SCA Java Common
> Annotations and APIs.
>
> Does the scope concept only concerns SCA runtime for Java ?
>
> *Best regards,*
> **
> *Marina.*
> *
> *
>
> Le 7 oct. 08 à 16:09, Simon Laws a écrit :
>
>
>
> On Tue, Oct 7, 2008 at 12:59 PM, Marina Deslaugiers <
> marina.deslaugiers@orange-ftgroup.com> wrote:
>
>> Hi,
>> I am currently dvelopping a demo using Tuscany 1.1 incubating. In the
>> prototype we use an (non SCA, remote) external (graphical) client that
>> connects to a SCA component using RMI naming.lookup (binding.rmi in the
>> composite file) then we invoke two successive operations on the retrieved
>> interface.
>> We run up against a problem: the (component) implementation instance is
>> different for each of the operation invocation consequently we loose
>> variables initialization made in the first operation invocation resulting in
>> immediate execution exception.
>> Is there any way (configuration, customizing or other) to save the state
>> say, save / retrieve the first implementation instance created that we need
>> ?
>>
>> *Regards,*
>> **
>> *Marina Deslaugiers*
>> *
>> *
>>
>> Hi Marina
>
> Is there some kind of session going on or are you happy with having a
> single component instance for all requests. If the latter you could set the
> scope of your component to be composite - @Scope("COMPOSITE").
>
> Simon
>
>
> Hi Marina

The scope idea many be mentioned obliquely in the assembly spec but
certainly the @Scope annotation is the preserve of the Java annotations and
APIs spec and @Scope is a java annotation.

Regards

Simon