Singletons are used in situations where we need access to a single set of data throughout
an application.
For example, application configuration data and reusable data caches are
commonly implemented using singletons. Singletons may also be used to coordinate access
to shared resources, such as coordinating write access to a file.
Singleton pattern is used for logging, drivers objects, caching and thread pool.(in log4j,Hibernate we are using the this pattern)
an application.
For example, application configuration data and reusable data caches are
commonly implemented using singletons. Singletons may also be used to coordinate access
to shared resources, such as coordinating write access to a file.
Singleton pattern is used for logging, drivers objects, caching and thread pool.(in log4j,Hibernate we are using the this pattern)
No comments:
Post a Comment