Santiago,

I should have explained that @Scope is an implementation concept, not an interface concept, so @Scope annotations can only be used on the Java implementation class itself.


Yours,  Mike.

Santiago Miguel Aranda Rojas wrote:
Thanks it works now. I had to put @Scope("COMPOSITE") in the implementation file. It does not work if you put that in the interface file.

2009/7/9 Mike Edwards <[email protected] <mailto:[email protected]>>

    Santiago Miguel Aranda Rojas wrote:

        I have two components in my SCA composite. First one has a wire
        with the second one and It is published as web service. The
        second one has an vector with data. It is a attribute of class.
        But I am losing this data because when I invoked to web service
        a new instance of implementation is created. I have read about
        Scope Stateless. I think this is my problem. How can I maintain
        the same instance of implementation? I put
        @Scope("CONVERSATION") in first and second component interfaces
        but it is not working. Any idea?
        Thank very much

    Santiago,

    Have you tried @Scope("COMPOSITE") ?

    This provides for a single instance of that component for all
    invocations - ie state that is shared with all service invocations
    on that component.


    Yours,  Mike.



Reply via email to