---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message ----- From: "Johnny Kewl" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, November 15, 2007 12:50 AM
Subject: Re: Redeploy issues loading contents from some .jar at WEB-INF/lib



---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message ----- From: "Leonardo Pinho" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Wednesday, November 14, 2007 11:10 PM
Subject: RE: Redeploy issues loading contents from some .jar at WEB-INF/lib



I guess not, because I'm doing the redeploy manually and just after the
transfer is completed. The autoDeploy feature is off in my tomcat, so I go to the Tomcat Manager and invoke the Reload operation for my web app using:

http://<host>:8080/manager/html/reload?path=/<app_name>

Leonardo Pinho wrote:
- If I just redeploy, without update the WAR, it works!

- If I update the WAR (some servlet code p.ex.) without update common.jar
(keep the same jar) and redeploy, it works!

- If I update the WAR and update common.jar (different version of the
jar)
and redeploy, it does NOT work!

Beeeeeeg guess here....
Update (if I remember) means that if it exists, it will undeploy first.
So I have a feeling this application (the offending class) wont undeploy.

It works if tomcat restarted, but not if tomcat running...
I think the application (class) is not letting go...
I think this because even if you change a JAR... if the classloader cannot let classes go because something is using it... it will not reload... the classloader will simply reuse the one in the classloader... so new on disk... does not mean new in classloader, unless that class loader can let go... something like that.

So the software somewhere does something like read the digest of the file on disk... then it checks that against the loaded class... bang they are different... I'm thinking a singleton or something has that class... and the classloader when told to reload, does not evem look at the new one on disk. How to check that, and how to kill that.... I have no idea, dont know Spring.

I been trying to imagine how this may happen....
When you reload... tomcat will drop the old webapp classloader and make a new one... BUT if some sort of bean factory which is global has picked up on some classes already, when told to again load some.class.in.webapp again, it wont if its already got it.... It gets horribly complicated because it is probably intelligent to know that when the web app is reloaded it must redo that bean, but if that bean is used in another running app... its screwed. Maybe if you stop all dependent apps first... and then redeploy, it woll work.
... maybe... ok no more guessing from me ;)



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to