|
From:
<el...@mi...> - 2003-11-23 13:55:21
|
How can I install the conf files in different directories, I'm assuming =
I'll
have to chage the batchfiels.
The files are depended on one another, the first one starts and listens =
to
port 4712 then the 2nd one starts and they both proceed a little =
further and
wait.
Usually this works fine. How ever when I tried your 2nd solution it =
almost
worked except the fact that 2nd server didn't know what port to =
listen.
It reads this information from cas.cfg file located in the =
application's
home directory
The directory structure is like this:
C:\compassrv\cs.bat which contains the original commands I told u about
C:\compassrv\cs1.bat which contains java.exe -classpath
"C:\COMPAS~2\lib;C:\COMPAS~2\lib\compass320.jar" JavaServer
C:\compasssrv\cas.cfg which is the config file for the 2nd server
These classes are the one created from your code=20
c:\compassrv\lib\JavaServer.class
c:\compassrv\lib\JavaServer$1.class
c:\compassrv\lib\JavaServer$2.class
the original class from which I started
c:\compassrv\lib\compass320.class
I'm assuming that if run the class from another java class it tries to =
seek
the cas.cfg file in another directory (probably due to relative,maybe =
it
starts from another root directory), I don't know how to make as though =
I'm
running from this directory
-----Original Message-----
From: Leif Mortenson [mailto:le...@ta...]=20
Sent: Friday, November 21, 2003 12:20 PM
To: wra...@li...
Subject: Re: [Wrapper-user] configuring Wrapper to run to java classes =
to
run as one service. ..
Elhanan,
Just like Java, the Wrapper only allows you to specify a single=20
class when it it launches
the JVM. In your application, you are launching the two classes in =
two=20
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=20
creating two different
wrapper.conf files. Either install them in different locations or =
take=20
care that the log and
any pid files are named uniquely and things should work great. If you=20
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=20
simply run both
of your applications from within the same JVM. To do this create a=20
simple class that
does the following:
public static main(String[] args)
{
Thread t1 =3D new Thread()
{
public void run()
{
CR.Compass.Server.CompassServer.main( new String[] {} );
}
};
t1.start();
Thread t2 =3D 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=20
new class as the
first wrapper.app.parameter and then specify=20
org.tanukisoftware.wrapper.WrapperSimpleApp
as the wrapper.java.mainclass. It should work.
If you found the support or the product useful, drop by the=20
following as well. =
http://wrapper.tanukisoftware.org/doc/english/donate.html
Let me know if you have any other questions.
Cheers,
Leif
=E0=EC=E7=F0=EF =EE=F2=E9=E9=EF wrote:
> Hi=85
>
> i have the following batch file to run a java server:
>
> =20
>
> start java -cp lib\compass320.jar CR.Compass.Server.CompassServer
>
> java -cp lib\compass320.jar CR.Compass.Server.CAS.CAS 0
>
> =20
>
> as u can see I need to invoke to 2 classes at the same time (which =
are
> from the same jar)=85
>
> =20
>
> is there a way to do this in wrapper?
>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does
SourceForge.net help you be more productive? Does it help you create =
better
code? SHARE THE LOVE, and help us help YOU! Click Here:
http://sourceforge.net/donate/
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
=20
This mail was scanned and found secure
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the sender immediately through the
technological support center,email:he...@mi... and do not disclose the contents to any one or make copies.
|