|
From: Leif M. <le...@ta...> - 2004-06-22 23:34:39
|
Kevin,
It is possible to run multiple Wrapper instances for each of your
classes. Each will
have a single Java process associated with it. But it sounds like you
would like to only
have one Wrapper process running.
The Wrapper is only capable of launching a single JVM. So directly, the
Wrapper not provide any way to launch 2 class files.
It is quite easy however. To create a small class file which has the job
of simply
calling each of your class's main methods:
public void main( String[] args ) {
Thread t1 = new Thread( "main-1" ) {
public void run() {
Class1.main( new String[] { "param1", "param2" } );
}
};
t1.start();
Thread t2 = new Thread( "main-2" ) {
public void run() {
Class2.main( new String[] { "param1" } );
}
};
t2.start();
}
This will work for a lot of applications. But some will have problems
because
they will both share a common working directory.
Cheers,
Leif
Ball, Kevin R wrote:
> Wrapper Config to call to separate class files.
>
> I have two java components, 2 different directories: server and servlet
>
> I need to have both started via the windows services, but would like
> to have one “service name” listed. Is the “Wrapper” configurable to
> perform such a task?
>
> Thanks.
>
>
> *Kevin Ball*
> Computer Associates
> Software Engineer
> tel: + 1 941 342-7056
> kev...@ca... <mailto:kev...@ca...>
>
> This e-mail message is for the sole use of the intended recipient(s)
> and may contain confidential and/or privileged information. Any
> unauthorized review, use, disclosure or distribution is prohibited. If
> you are not the intended recipient, please contact the sender by reply
> e-mail and destroy all copies of the original message.
>
|