singleton « Thread « JSP-Servlet Q&A





1. dao as a member of a servlet - normal?    stackoverflow.com

I guess, DAO is thread safe, does not use any class members. So can it be used without any problem as a private field of a Servlet ? We need only one ...

2. How to make a thread safe singleton class (that holds state)    stackoverflow.com

I know that singleton classes are inherently not thread-safe. But is there any way to make it so? I have a singleton in a java web application, and I want ...