A couple of questions: How are you deploying the web app? Is the daemon thread aware of the Servlet lifecycle?
I have observed that when deploying via the Tomcat manager, there are cases where the web app is stopped and restarted erroneously. Basically, it starts after a deploy, then within a few seconds it stops and then restarts. If this is happening and your daemon thread is not Servlet lifecycle aware and does not stop when the ServletContext is destroyed, then that daemon is what is pinning your web application and therefore WebappClassLoader. On Sat, 2003-03-29 at 00:48, Micael wrote: > I have created a daemon which I want to startup when Tomcat is started > up. If I configure the daemon to be started with a servlet in web.xml or > by using a PlugIn interface and struts-config.xml, I get two daemons > running. How I don't know. If I don't start the daemon at startup but by > tweaking a servlet after startup, where the servlet calls the daemon, then > I don't get two daemons. Does anyone have any idea how this is > happening? I am getting two classloaders of the same type, i.e. same type > but different hashcodes. Anyone know what is going on. I am running > Struts 1.1 and Tomcat 1.1.18. I have asked this question in a few ways > with no responses. I can find nothing relevant in the archives. They are > both coming from the WebappClassLoader which has as a parent > [EMAIL PROTECTED] > > Hopefully someone has some assistance, because I am somewhat at a > loss. This must have something to do with the launcher, but I don't know > what. I have tried to get some information for a week out of this > list. Not sure if no one is doing PlugIns, or why there is so little > interest in this. > > The hashcodes I get for the classloaders are as follows: > > > LOOP: ClassLoader.hashCode(): 728272 Class.hashCode(): 15612583 Check > No.: 657) Fri Mar 28 22:47:17 PST 2003 END > > > LOOP: ClassLoader.hashCode(): 20632381 Class.hashCode(): 10973446 Check > No.: 659) Fri Mar 28 22:47:19 PST 2003 END > > The details on the classloaders are: > > LOOP: ClassLoader.toString(): WebappClassLoader > available: > Extension[org.apache.commons.beanutils, implementationVendor=Apache > Software Foundation, implementationVersion=1.4-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.collections, implementationVendor=Apache > Software Foundation, implementationVersion=2.0, specificationVendor=Apache > Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.dbcp, implementationVendor=Apache > Software Foundation, implementationVersion=1.0-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.digester, implementationVendor=Apache > Software Foundation, implementationVersion=1.3-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[commons-lang, implementationVendor=Apache Software > Foundation, implementationVersion=1.0-dev, specificationVendor=Apache > Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.logging, implementationVendor=Apache > Software Foundation, implementationVersion=1.0.1-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.pool, implementationVendor=Apache > Software Foundation, implementationVersion=1.0, specificationVendor=Apache > Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.resources, implementationVendor=Apache > Software Foundation, implementationVersion=0.1-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.services, implementationVendor=Apache > Software Foundation, implementationVersion=1.0-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[Struts Framework, implementationVendor=Apache Software > Foundation, implementationVendorId=org.apache, implementationVersion=1.0, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[Components Framework, implementationVendor=Apache Software > Foundation, implementationVendorId=org.apache, implementationVersion=0.7, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > delegate: false > repositories: > /WEB-INF/classes/ > required: > ----------> Parent Classloader: > StandardClassLoader > available: > delegate: true > repositories: > required: > ----------> Parent Classloader: > StandardClassLoader > available: > Extension[org.apache.tools.ant, implementationVendor=Apache Software > Foundation, implementationVersion=1.5.1, specificationVendor=Apache > Software Foundation, specificationVersion=1.5.1] > Extension[org.apache.commons.collections, implementationVendor=Apache > Software Foundation, implementationVersion=1.1-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.logging, implementationVendor=Apache > Software Foundation, implementationVersion=1.0.2, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > delegate: true > repositories: > file:C:\michaelmcgrady\tomcat\common\lib\ant.jar > file:C:\michaelmcgrady\tomcat\common\lib\commons-collections.jar > file:C:\michaelmcgrady\tomcat\common\lib\commons-logging-api.jar > file:C:\michaelmcgrady\tomcat\common\lib\jasper-compiler.jar > file:C:\michaelmcgrady\tomcat\common\lib\jasper-runtime.jar > file:C:\michaelmcgrady\tomcat\common\lib\jdbc2_0-stdext.jar > file:C:\michaelmcgrady\tomcat\common\lib\naming-common.jar > file:C:\michaelmcgrady\tomcat\common\lib\naming-factory.jar > file:C:\michaelmcgrady\tomcat\common\lib\naming-resources.jar > file:C:\michaelmcgrady\tomcat\common\lib\servlet.jar > required: > ----------> Parent Classloader: > [EMAIL PROTECTED] > > > Class.toString(): class > com.michaelmcgrady.util.message.messages.ip_address.IpDaemon/No.: 0) Fri > Mar 28 22:57:36 PST 2003 END > > > LOOP: ClassLoader.hashCode(): 12864392 Class.hashCode(): 32915800/No.: 0) > Fri Mar 28 22:57:36 PST 2003 END > > > LOOP: ClassLoader.toString(): WebappClassLoader > available: > Extension[org.apache.commons.beanutils, implementationVendor=Apache > Software Foundation, implementationVersion=1.4-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.collections, implementationVendor=Apache > Software Foundation, implementationVersion=2.0, specificationVendor=Apache > Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.dbcp, implementationVendor=Apache > Software Foundation, implementationVersion=1.0-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.digester, implementationVendor=Apache > Software Foundation, implementationVersion=1.3-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[commons-lang, implementationVendor=Apache Software > Foundation, implementationVersion=1.0-dev, specificationVendor=Apache > Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.logging, implementationVendor=Apache > Software Foundation, implementationVersion=1.0.1-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.pool, implementationVendor=Apache > Software Foundation, implementationVersion=1.0, specificationVendor=Apache > Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.resources, implementationVendor=Apache > Software Foundation, implementationVersion=0.1-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.services, implementationVendor=Apache > Software Foundation, implementationVersion=1.0-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[Struts Framework, implementationVendor=Apache Software > Foundation, implementationVendorId=org.apache, implementationVersion=1.0, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[Components Framework, implementationVendor=Apache Software > Foundation, implementationVendorId=org.apache, implementationVersion=0.7, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > delegate: false > repositories: > /WEB-INF/classes/ > required: > ----------> Parent Classloader: > StandardClassLoader > available: > delegate: true > repositories: > required: > ----------> Parent Classloader: > StandardClassLoader > available: > Extension[org.apache.tools.ant, implementationVendor=Apache Software > Foundation, implementationVersion=1.5.1, specificationVendor=Apache > Software Foundation, specificationVersion=1.5.1] > Extension[org.apache.commons.collections, implementationVendor=Apache > Software Foundation, implementationVersion=1.1-dev, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > Extension[org.apache.commons.logging, implementationVendor=Apache > Software Foundation, implementationVersion=1.0.2, > specificationVendor=Apache Software Foundation, specificationVersion=1.0] > delegate: true > repositories: > file:C:\michaelmcgrady\tomcat\common\lib\ant.jar > file:C:\michaelmcgrady\tomcat\common\lib\commons-collections.jar > file:C:\michaelmcgrady\tomcat\common\lib\commons-logging-api.jar > file:C:\michaelmcgrady\tomcat\common\lib\jasper-compiler.jar > file:C:\michaelmcgrady\tomcat\common\lib\jasper-runtime.jar > file:C:\michaelmcgrady\tomcat\common\lib\jdbc2_0-stdext.jar > file:C:\michaelmcgrady\tomcat\common\lib\naming-common.jar > file:C:\michaelmcgrady\tomcat\common\lib\naming-factory.jar > file:C:\michaelmcgrady\tomcat\common\lib\naming-resources.jar > file:C:\michaelmcgrady\tomcat\common\lib\servlet.jar > required: > ----------> Parent Classloader: > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
