|
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.
|