|
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.
|
|
From:
<el...@mi...> - 2003-11-23 18:03:41
|
I'm sending this to both of u since I don't know exactly where the problem
exists
First I discovered I cannot launch the 2 class (compasserver,cas) in code
from the same jvm because compassserver locks cas.cfg
I know this because after remarking the first class (comapsserver) and
telling the batch file to raise the original class and then my class with my
code, only then it worked, by trying your code as u wrote it, the 2nd class
keeps saying that it could find the CASListenport on line 4 (which is in
cas.cfg, which it couldn't read I guess)
So I was left with the 2nd alternative:
After creating to adtional directories (confCAS,confSERVER) and modifying
and creating 2 install files, 2 run files, and 2 uninstall files (by simply
chaning each files conf directory to my own directories) I was able to
install the services.
After changing the conf files according I was left the following problems.
The classes won't run unless they will have server.cfg and cas.cfg in the
directory where wrapper.exe exists. Even though i specified the the root
directory in wrapper.java.class parameters
Originally thought both files were in the same directory as the original
batch file.
This is not a major problem because after copying both files into
Directories it seemed to work. Also comass also demanded the directory lacid
(also located in the root directory of the application) will be copied to
the directory of batch files
Now the real problem started when I tried accessing compass with java client
api sample... suddenly windows alerted the lacombi.exe needed the file
libsybdb.dll and couldn't find it. The strange thing is that I REALLY
couldn't find it, now in my entire c drive and not in the network directory
which contains the oracle.dll
Also I've checked lacombi with dependency walker an it really doesn't
reference this dll.
Running compass normally does not raise this error. I have no idea what is
this dll for.
-----Original Message-----
From: Leif Mortenson [mailto:le...@ta...]
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
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?
>
-------------------------------------------------------
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
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.
|
|
From: Leif M. <le...@ta...> - 2003-11-24 07:05:16
|
Elhanan,
After reading through all of this, the final problem is that the
executable lacombi.exe
binary can not locate a required dll file. I am not really clear how
that relates to the
Wrapper? Is that application being launched by one of your 2 JVMs?
If the DLL is required as a JNI native library by one of the classes
in your Java
application then you must include the location of the DLL on your java
library path.
When you run Java without the wrapper, it uses a default library path
that includes
the windows directory and user directory. When running with the
Wrapper, you
must set this manually in the wrapper.conf file.
Since you can not locate this file anyplace, not sure if that is
your problem
however.
Other than that, it sounds like your 2 JVMs are starting up
correctly. Could you
please set the wrapper.debug=true property in both of your wrapper.conf
files. Then
reply with the 2 wrapper.conf files and wrapper.log files as
attachments. Please only
include the log output for a SINGLE JVM invocation.
I may be able to spot something to help you out.
Cheers,
Leif
אלחנן מעיין wrote:
> I'm sending this to both of u since I don't know exactly where the
> problem exists
>
> First I discovered I cannot launch the 2 class (compasserver,cas) in
> code from the same jvm because compassserver locks cas.cfg
>
> I know this because after remarking the first class (comapsserver) and
> telling the batch file to raise the original class and then my class
> with my code, only then it worked, by trying your code as u wrote it,
> the 2nd class keeps saying that it could find the CASListenport on
> line 4 (which is in cas.cfg, which it couldn't read I guess)
>
> So I was left with the 2nd alternative:
>
> After creating to adtional directories (confCAS,confSERVER) and
> modifying and creating 2 install files, 2 run files, and 2 uninstall
> files (by simply chaning each files conf directory to my own
> directories) I was able to install the services.
>
> After changing the conf files according I was left the following
> problems.
> The classes won't run unless they will have server.cfg and cas.cfg in
> the directory where wrapper.exe exists. Even though i specified the
> the root directory in wrapper.java.class parameters
>
> Originally thought both files were in the same directory as the
> original batch file.
> This is not a major problem because after copying both files into
> Directories it seemed to work. Also comass also demanded the directory
> lacid (also located in the root directory of the application) will be
> copied to the directory of batch files
>
> Now the real problem started when I tried accessing compass with java
> client api sample... suddenly windows alerted the lacombi.exe needed
> the file libsybdb.dll and couldn't find it. The strange thing is that
> I REALLY couldn't find it, now in my entire c drive and not in the
> network directory which contains the oracle.dll
>
> Also I've checked lacombi with dependency walker an it really doesn't
> reference this dll.
>
> Running compass normally does not raise this error. I have no idea
> what is this dll for.
>
> -----Original Message-----
>
|