|
From: Ori A. <oa...@me...> - 2004-12-06 08:40:09
|
Leif,
Thanks for pointing out the problems with my solution, luckily I didn't fall
into any of the problem categories, but it's just luck :-)
I was looking for the smallest code change available for it to work.
I want to upgrade my version anyway, so I'll look into the 3.2.0 that has a
complete solution for this.
Regards,
Ori
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Leif
Mortenson
Sent: Monday, December 06, 2004 9:11 AM
To: wra...@li...
Subject: Re: [Wrapper-user] Re-read wrapper.conf on restart?
Todd,
I went in today and got this implemented for the the next Wrapper
release (3.2.0).
It will be enabled using a new wrapper.restart.reload_configuration
property.
The patch submitted by Ori will work for most cases. The exception is if
you have
declared any filters or have any dependent services defined on Windows
versions.
Those will both leak memory on each restart but the leak is pretty
small. Everything
else should work for you.
This patch will also have problems if you remove properties from the
configuration
file. You can change or add property values but this patch will not
remove them.
The implementation in the 3.2.0 release is done a bit differently so the
above
problems are all resolved there.
Thanks Ori.
Cheers,
Leif
Ori Argov wrote:
> 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
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
|