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.