wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes singletone ServiceLocator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "singletone ServiceLocator" Watch "singletone ServiceLocator" New topic
Author

singletone ServiceLocator

Gytis Jakutonis
Ranch Hand

Joined: Feb 02, 2004
Posts: 76
Hello,
I'm using ServiceLocator pattern to locate EJB's and other JNDI resources. Currently I have singletone ServiceLocator, but I'm not sure about this implementation style. I really hate singletones, because they can not be subclassed, garbaged, initialized in custom way etc. But I can not figure out any alternative way to use ServiceLocator in EJB layer and BusinessDelegate layer. These layers has no access to general scope (like ServletContext). Any ideas?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: singletone ServiceLocator
 
Similar Threads
Singletone Pattern
Concurrent invocation of a singletone method
singletone pattern
Data: Mutition/Singletone