This week's book giveaway is in the Java in General forum. We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line! See this thread for details.
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?