Consider we are using Singleton Object for Dependency Injection in our Service Class.
By default, we need to make sure,
- the singleton object are threadsafe and
- it is immutable Object.
But during our coding, we are not considering any of the above points in our development. We let the spring to create the bean and simply we are using it(reference).
Does the spring has his design to take care of this threadSafe?.
At which scenario, we would need to explicitly take care of Synchronized operation?.
No comments:
Post a Comment