|
From: Leif M. <le...@ta...> - 2003-11-21 10:20:39
|
Elhanan,
Just like Java, the Wrapper only allows you to specify a single
class when it it launches
the JVM. In your application, you are launching the two classes in two
different JVM
instances.
There are a couple ways to do you may want to be doing.
1) Launch two copies of the Wrapper. This can easily be done by
creating two different
wrapper.conf files. Either install them in different locations or take
care that the log and
any pid files are named uniquely and things should work great. If you
are running under
NT you can even setup a dependency on the other server using the
wrapper.ntservice.dependency.<n> properties.
2) Depending on how your applications work. You may also be able to
simply run both
of your applications from within the same JVM. To do this create a
simple class that
does the following:
public static main(String[] args)
{
Thread t1 = new Thread()
{
public void run()
{
CR.Compass.Server.CompassServer.main( new String[] {} );
}
};
t1.start();
Thread t2 = new Thread()
{
public void run()
{
CR.Compass.Server.CAS.CAS.main( new String[] { "0" } );
}
};
t2.start();
}
I didn't compile the above, but it should work. Just specify this
new class as the
first wrapper.app.parameter and then specify
org.tanukisoftware.wrapper.WrapperSimpleApp
as the wrapper.java.mainclass. It should work.
If you found the support or the product useful, drop by the
following as well.
http://wrapper.tanukisoftware.org/doc/english/donate.html
Let me know if you have any other questions.
Cheers,
Leif
אלחנן מעיין wrote:
> Hi…
>
> i have the following batch file to run a java server:
>
>
>
> start java -cp lib\compass320.jar CR.Compass.Server.CompassServer
>
> java -cp lib\compass320.jar CR.Compass.Server.CAS.CAS 0
>
>
>
> as u can see I need to invoke to 2 classes at the same time (which are
> from the same jar)…
>
>
>
> is there a way to do this in wrapper?
>
|