This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I got a problem with my servlet on OC4J, because it instance is being created twice by the container. My web.xml:
and my servlet code:
1. The init() method is called twice 2. The destroy() method isn't called 3. The servlet is mapped only once 4. Each time servlet starts, the instances attribute is 0 and the previously created singleton JournallingOrdersGenerator is null
The problem is, that when servlet starts twice, the singleton object JournallingOrdersGenerator is again null and is created (and started) twice.
I'm desperated and I have no more ideas how to fix it. Do you know any solution? I've read that on Tomcat is the same problem.