Pages

Tuesday, July 1, 2014

Java EE singleton pitfall

If you implement a singleton class with the @Singleton annotation, then it is  considered all the method level access is read and write. Therefore a write lock is established automatically. Which is not good. Since when a method required a read lock its default setting is a write lock. So when you are programming, then you should always keep that in mind.

No comments:

Post a Comment