Mantis - Resin
Viewing Issue Advanced Details
5611 minor always 12-12-13 00:03 09-12-14 14:48
Gerrit Janssen  
ferg  
normal  
closed 4.0.37  
fixed  
none    
none 4.0.41  
0005611: contextInitialized method of a ServletContextListener is called twice
I'm using a ServletContainerInitializer to register a ServletContextListener instance. While registering the listener, its contextInitialized() method is called a first time:
contextInitialized():106, ContextLoaderListener {org.springframework.web.context}
addListenerObject():2157, WebApp {com.caucho.server.webapp}
addListener():2112, WebApp {com.caucho.server.webapp}
onStartup():31, WebAppInitializer {com.cartagenia.web}
onStartup():181, SpringServletContainerInitializer {org.springframework.web}
callInitializer():3479, WebApp {com.caucho.server.webapp}
callInitializers():3447, WebApp {com.caucho.server.webapp}
startImpl():3672, WebApp {com.caucho.server.webapp}

Next, when execution of the WebApp.startImpl() method continues, it is called a second time:
contextInitialized():106, ContextLoaderListener {org.springframework.web.context}
startImpl():3688, WebApp {com.caucho.server.webapp}

I would assume that the contextInitialized method gets called only once.

Could this be related to http://bugs.caucho.com/view.php?id=5481 [^] ?
This is the exact same error message I am getting.

Notes
(0006530)
ferg   
09-12-14 14:48   
server/1p08