dev@glassfish.java.net

startup logic problem

From: Larry White <Larry.White_at_Sun.COM>
Date: Tue, 12 Dec 2006 15:51:40 -0800

Folks:

I have evidence here that our startup sequence is broken.

What the following stack dumps reveal is that web apps (both system and
non-system)
are being loaded before the WebContainer has started. It is interesting
that apps
even can be loaded before the web container is started. Tests should
have failed.

The essential issue is here:
First this occurs ---------
   at
com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:204)
    at
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:332)
Then slightly later this occurs ----------
    at
com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:71)
    at
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:332)

And the ApplicationLifecycle must not be aware that the web container is
not started as it
moves to load web modules.

[#|2006-12-12T15:45:26.788-0800|WARNING|sun-appserver-ee9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=6d1640ef-7f9e-4a0a-9057-3a4036b06028;|
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1158)
    at
com.sun.enterprise.ee.web.sessmgmt.EEPersistenceTypeResolver.resolvePersistenceType(EEPersistenceTypeResolver.java:88)
    at
com.sun.enterprise.web.PersistenceStrategyBuilderFactory.createPersistenceStrategyBuilder(PersistenceStrategyBuilderFactory.java:88)
    at
com.sun.enterprise.web.WebContainer.configureSessionManager(WebContainer.java:1834)
    at
com.sun.enterprise.web.WebContainer.configureSessionSettings(WebContainer.java:1776)
    at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1493)
    at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1194)
    at
com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1119)
    at
com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:128)
    at
com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:208)
    at
com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:204)
    at
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:332)
    at
com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
    at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
    at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
|#]

Then later you see this:

WebContainer start entered - dumping stack|#]

[#|2006-12-12T15:45:26.923-0800|WARNING|sun-appserver-ee9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=6d1640ef-7f9e-4a0a-9057-3a4036b06028;|
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1158)
    at com.sun.enterprise.web.WebContainer.start(WebContainer.java:800)
    at
com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:750)
    at
com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:71)
    at
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:332)
    at
com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
    at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
    at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
|#]