-
1. Re: One instance or many
kcbabo Dec 10, 2014 8:41 AM (in response to ozkin)Bindings are designed to handle concurrent requests, so no issues there. The same thing is true for implementation components, but may not be the case for your service implementation depending on how you write it. For example, member variables in your bean service implementation class will not be guarded from concurrent access by the container - the implementation is assumed to be stateless. If you need to store state specific to a request in a member var, then consider synchronizing access to it (bummer as it serializes concurrent requests), pushing it into a ThreadLocal (this is how we handle injected SY vars like Context), or by attaching it as a context property to the exchange.
-
2. Re: One instance or many
ozkin Dec 10, 2014 1:22 PM (in response to kcbabo)Thanks Keith. Eventually I figured it out during my testing. Requests are handled concurrently and implementation components are stateless. Originally I was curious if SY creates only one or may create multiple instances of an implementation component. I understood it is always only one.