|
From: Filippo L. <liv...@we...> - 2004-11-24 10:00:34
|
Hi,
I'm using Service Wrapper to install and start a networking
multi-threaded Java application and I've a serious problem while running
from server side a background timer thread that keeps calling a RMI ping
method to verify clients status. If start my server application without
Service Wrapper it works correctly, my thread keeps doing its job at
prefixed timeouts, while if I start my application using Service Wrapper
the thread doesn't even start and doesn't execute any ping. Any other
thread is working fine. This is the significant portion of my property
configuration:
wrapper.java.additional.1=-server
wrapper.java.additional.2=-Djava.awt.headless=true
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp
wrapper.app.parameter.1=srvLayer.server.SimServer
wrapper.app.parameter.2=1
wrapper.app.parameter.3=..\..\conf\properties.xml
wrapper.app.parameter.4=srvLayer.server.HaltServer
wrapper.app.parameter.5=true
wrapper.app.parameter.6=2
wrapper.app.parameter.7=localhost
wrapper.app.parameter.8=4010
wrapper.max_failed_invocations=2
wrapper.jvm_exit.timeout=15
wrapper.startup.timeout=60
wrapper.shutdown.timeout=10
wrapper.cpu.timeout=0
wrapper.ping.interval=60
wrapper.ping.timeout=120
wrapper.use_system_time=FALSE
wrapper.single_invocation=TRUE
This is the way I create and call the ping thread:
pingTimer = new javax.swing.Timer(PropConst.PING_DELAY, this);
...
pingTimer.start();
...
In the run method I start another thread to execute the RMI ping:
Thread pingTr = new Thread(rmiPing);
pingTr.start();
try{
pingTr.join(timeout);
}catch(InterruptedException iEx){
log.error("Error trying to join Ping Thread: ",iEx);
}
in the run method it simply calls a remote isAlive() method on the
client.
Thanks for your help,
Filippo Liverani
liv...@we...
|