I've noticed that I have been making some of my services COMPOSITE scope, others not, without apparent reason. My question regards the difference between composite and default (request) scope, disregarding conversations.
As I see it, either a service implementation maintains state or it does not. If it does, it must be made composite scope, so as not to lose the state between requests, and one must take care of shared access (thread issues) in one's programming. If it does not, it wouldn't matter if it were composite scope, as there would be no shared state to care about how to access anyway. So it could as well be made composite. A service being composite scope earns the additional benefit of the init() method, which can be costly, only being executed once. So I would decide to make all my services composite scope by default. Would that be wrong? In other words, is there any particular advantage associated with default scope services? Any specific runtime properties in Tuscany 1.6 perhaps? -- Sebastian
