I found alternative way of achieving same. That is, instead of having reference through component, we are having external class as field of SCA service implementation class and instantiating this object in SCA service constructor.
Does it have any side effects? I would like take your comments and suggestions with this approach. Regards Raman -----Original Message----- From: Malisetti, Ramanjaneyulu Sent: Tuesday, 23 February 2010 7:58 PM To: [email protected] Subject: RE: singleton references in SCA service I tried @Scope composite. Nope. Regards Raman -----Original Message----- From: Hatfield, Dan [mailto:[email protected]] Sent: Tuesday, 23 February 2010 7:42 PM To: [email protected] Subject: RE: singleton references in SCA service Refer to the @Scope SCA annotation. ________________________________ From: Malisetti, Ramanjaneyulu [[email protected]] Sent: Tuesday, February 23, 2010 9:05 AM To: [email protected] Subject: singleton references in SCA service We have SCA based service implementation class that contains reference to other Java class let me refer it as external class. It is pretty much similar to CalculatorServiceImpl class which holds references to addservice, subtractService, etc. Service also has getter methods to return references of external classes. We are creating SCA node with service composite and starting Node from simple java application. Now, if we call methods of external class on external references from same java application where Node is created and started, SCA runtime is creating new instance of external class for every function invocation on external references. I guess this is expected behavior. Is there way to control in creating instances? Can we make SCA runtime to create singleton object for references? Here I have attached sample for your reference. Regards Raman <<jms-sdodatabinding-modified.zip>>
