I turned ApplicationLifecycleListener into a ServletContextAttributeListener too, with these methods added:
public void attributeAdded(ServletContextAttributeEvent event) { log.info("event = " + event.getName()); }
public void attributeRemoved(ServletContextAttributeEvent event) { log.info("event = " + event.getName()); }
public void attributeReplaced(ServletContextAttributeEvent event) { log.info("event = " + event.getName()); }
Here is the relevant order of events:
Aug 4, 2003 11:19:37 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
contextInitialized
INFO: application = [EMAIL PROTECTED]
Aug 4, 2003 11:19:37 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
contextInitialized
INFO: container =
[EMAIL PROTECTED] de29
Aug 4, 2003 11:19:37 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
attributeAdded
INFO: event = DefaultComponentManager
Aug 4, 2003 11:19:37 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
attributeAdded
INFO: event = ComponentConfiguration
08/04 11:19:37 user JSPServlet: init
08/04 11:19:37 info Deploying enterprise application "Flash Remoting
EAR" from: file:/C:/JRun4/lib/flashgateway.ear
08/04 11:19:37 info Deploying web application "Flash Remoting" from:
file:/C:/JRun4/lib/flashgateway.ear
08/04 11:19:38 user JSPServlet: init
08/04 11:19:38 user FlashGatewayServlet: init
Server default ready (startup time: 34 seconds)
08/04 11:19:44 user FlashGatewayServlet: destroy
Aug 4, 2003 11:19:44 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
attributeRemoved
INFO: event = ComponentConfiguration
Aug 4, 2003 11:19:44 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
attributeRemoved
INFO: event = DefaultComponentManager
Aug 4, 2003 11:19:44 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
contextDestroyed
INFO: event =
javax.servlet.ServletContextEvent[source=jrun.servlet.JRunServletContext @52eef4]
Aug 4, 2003 11:19:44 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
contextDestroyed
INFO: application = [EMAIL PROTECTED]
Aug 4, 2003 11:19:44 AM
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
contextDestroyed
INFO: container = null
08/04 11:19:44 error RuntimeException thrown in operation stop [1]java.lang.NullPointerException at com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener.conte xtDestroyed(ApplicationLifecycleListener.java:44) at jrun.servlet.JRunServletContext.fireContextDestroyedEvent(JRunServlet Context.java:365)
As you can probably tell, I added some additional logging in the contextInitialized/Destroyed message.
So, JRun removes things from application scope before calling the contextDestroyed method. I'll patch this up by doing a comparison and cleanup in attributeRemoved and keep the class implementing ServletContextAttributeListener.
After I get this all working on my end, I'll submit a patch.
Erik
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork