----- Original Message -----
From: Steven Probetts
To: [email protected]
Sent: Tuesday, June 24, 2008 10:58 AM
Subject: Tomcat caching and deployment issues
Hi all,
I am running Tomcat 5.5.25 on MACOSX Server.
I seem to be having a problem with what seems to be caching through
deployments.
I deploy a newer version of my application (which uses Icefaces) or
make a change in the database and what appears to happen is that the
changes don't take effect until after i stop and restart the tomcat
instance. (I do this via launchd load and unload commands).
Resetting the browser caches doesn't seem to solve the problem, only
restarting tomcat.
My web app uses iceFaces (a plug in to JSF which I believe icefaces is
written in javascript).
I also have a suspicion that Tomcat was copied (or at least the
directories such as conf, temp, work and all the others) from another
machine....if this helps. A single binary of Tomcat is stored
elsewhere in the file system which (/opt/tomcat/).
Also we don't use the webapps directory. We put the war file into a
specially created wars dir and point to it from the context file (we
do this so that we can have one war file serve multiple sites, each
site having a different context file.). The native tomcat that
apparently comes with MACOSX server wasn't used, I'm not sure why.
The directory structure looks like:
/opt/tomcat/wars stores our war files These are pointed to from each
site's (instance's) context file
/opt/tomcat/instances/site-name1/ contains the conf, webapps (not
used), logs ....etc
Running version.sh returns:
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/
Versions/1.5/Home
Server version: Apache Tomcat/5.5.25
Server built: Aug 24 2007 05:33:50
Server number: 5.5.25.0
OS Name: Mac OS X
OS Version: 10.5.3
Architecture: i386
JVM Version: 1.5.0_13-b05-237
JVM Vendor: Apple Inc.
Any help would be appreciated. I'm fairly new to Tomcat, iceFaces etc
so I'm not sure what caches where etc.
Steve, it sounds like a hard, painful and wrong way to go, I dont know what
the macs file locking is like, but if its anything like MS, no, its wrong.
And if you using docbase in a folder outside of TC, you still have to tell
TC to deploy. I dont think its automatic, outside of webapp.
And I think making 3 TC's share a webapp would even be more problems, three
TC's unpacking at the same time... ouch!
I would suggest you happily store your webapp centrally, but then open up
/manager/html on each TC and just deploy the thing.
Less pain...
I dont know Mac, but Mac does seem to have a fixed Java and probably TC
version, so maybe the original admin guy didnt want to buy a new machine, just
to get a different TC and Java version... Mac and Java seems to be a strange
setup.
The dB is another story and the guru's that use it can help you, but the
short version is that if the JNDI dB is setup globally, it wont reinit because
it things there is more than one webapp using it... if its setup per webapp,
then it redoes the pool and connections on a redeploy.
But I think its just that the webapp is not loading in your case...
If you can make it simple... people are used to dropping webapps into
webapp... why change that.
Good luck