|
From: Ori A. <oa...@me...> - 2004-12-05 08:36:40
|
Hi Todd,
I'm using version 3.0.2 and I also needed this feature (I should really
upgrade though...).
What I did was add a line to the following function in wrapper.c:
void wrapperRestartRequested() {
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_STATUS, "JVM requested a
restart.");
// THE FOLLOWING LINE WAS ADDED
loadProperties(properties, wrapperData->configFile);
wrapperLoadConfiguration();
wrapperRestartProcess();
}
Then, calling a WrapperManager.restart() will also re-read the properties
file.
I also found it useful to use the #include feature of the conf files in this
case and add dynamic classpath
Entries to another conf file which is always included by the main one.
Hope it helps,
Ori
_____
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Todd Klaus
Sent: Saturday, December 04, 2004 4:30 AM
To: wra...@li...
Subject: [Wrapper-user] Re-read wrapper.conf on restart?
Hi,
I am using Wrapper 3.0.5 and have the following classpath set in
wrapper.conf:
wrapper.java.classpath.1=../lib/*.jar
wrapper.java.classpath.2=../lib/*.zip
I would like to support upgrade capability in my application whereby new
jars are sent to the application via JMS and written to the applications lib
directory (referenced by the classpath above). As soon as the new jars are
downloaded, I restart the app using WrapperManager.restart().
Unfortunately, it seems that the wrapper does not rebuild the classpath on
restart, because I get ClassNotFound exceptions for classes referenced in
the new jars after the restart. A complete shutdown and restart of the app
works fine (but doesn't meet the goal of being fully automatic!). These are
usually new third-party jars, so they were not in the classpath before the
upgrade.
I even tried programmatically modifying wrapper.conf to explicity add a
reference to the new jar, like this:
wrapper.java.classpath.3=../lib/newjar.zip
but it seems that the wrapper doesn't even re-read wrapper.conf on a
restart.
Is there any way to force the wrapper to re-read the conf file? Any other
way to accomplish this? Any comments/suggestions welcome!
Thanks,
Todd
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________ |