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>>
