|
From: Leif M. <le...@ta...> - 2007-02-22 01:22:02
|
Donal,
Each of the 4 java processes are independent applications. Are they
all installed
in the same directory as well? How are things set up?
If they are different installs, then you could generate your
wrapper.conf files
at build time my making the main class name a token that gets replaced.
If all 4 applications will be using the same install directory or
the above does not
work, another option is to move everything other than the main class,
service name,
and log file into a file called conf/wrapper-common.conf
Then modify your wrapper.conf to look like this:
---
#include ../conf/wrapper-common.conf
wrapper.app.parameter.1=foo.bar.MyProcessMainClass
wrapper.logfile=../logs/wrapper-app1.log
wrapper.console.title=App1
wrapper.ntservice.name=App1
wrapper.ntservice.displayname=App1
wrapper.ntservice.description=App1Desc
---
See this page for details.
http://wrapper.tanukisoftware.org/doc/english/props-cascading.html
Note that if all 4 apps are in the same directory, you are also going to
need to make sure
they all have their own wrapper.log file. Any use of pid, state, or
lock files will also need
to avoid conflicts.
You could also keep a single wrapper.conf and then set the above
properties from
the wrapper command line. If you are using a bat or sh file, this would
be feasible.
http://wrapper.tanukisoftware.org/doc/english/props-command-line.html
Using environment variables and then dereferencing them in the
wrapper.conf is another
option.
http://wrapper.tanukisoftware.org/doc/english/props-envvars.html
In general, the Wrapper is not designed to have more than one instance
running out
of the same directory at the same time. It is possible, but you will
have some work
to make sure there are no file conflicts etc. The sh script on linux
will work if you set
use set unique APP_NAME and WRAPPER_CONF values in the sh script.
Cheers,
Leif
Donal Murtagh wrote:
> Hi,
>
> I have 4 java processes that I wish to wrap. Each one has a different main class, but apart from that they are identical (in terms of JVM parameters, application parameters, etc.).
>
> Therefore, I currently have 4 wrapper.conf files - one for each process - which are identical apart from
>
> wrapper.app.parameter.1=foo.bar.MyProcessMainClass
>
> Is there any way I can avoid the duplicating the JVM parameters, application parameters for each process?
>
> Thanks,
> TD
>
|