Blue Diamond wrote:
Hi,

I have a @scope(composite) annotated component (service). This is a singleton for me (correct me if I am wrong) and no matter how many clients call the service operations, its the same service instance that's going to handle them.

SCA API provides a way to obtain service reference to this component through say SCANode.getServiceReference().

But is there a way I can obtain the object reference to this instantiated service instance? I understand that SCA has boundaries, but is there any way by which this can be done? SCA creates a component, I want to obtain its object reference (I want to inject some other non-SCA created object into it). Is this doable?

Thanks,
Anil
>
The component implementation could define a service with a local interface
which provides a setter method for the non-SCA created object.  After the
singleton instance has been created, you could call this setter method to
inject the non-SCA created object.

  Simon

Reply via email to