• Post Reply Bookmark Topic Watch Topic
  • New Topic

singletone ServiceLocator  RSS feed

 
Gytis Jakutonis
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!