I'm using yajsw-beta-10.2. I created 2 windows services with yajsw in order to stop/start each other. I'm using the following code:
String currentConfiguration = System.getProperty("wrapper.config");
//or System.setProperty("wrapper.config", "wrapper2.conf");
WrappedService w = new WrappedService();
It works fine on windows, but when I try to use it on Linux the daemon doesn't start. One of the daemons stops the other one but when it tries to start the log says "INFO: already running".
As I am using two services there are 2 pid files. I think the problem is because yajsw don't get the correct pidName. You can see it printing pidName in PosixService.init().
pidName = _config.getString("wrapper.pidfile", new File(pidDir, "wrapper." + getName() + ".pid").getCanonicalPath());
As I'm using the default wrapper.pidfile I did the following modification:
pidName = new File(pidDir, "wrapper." + getName() + ".pid").getCanonicalPath();
Now it works fine, but I know the modification isn't correct. When you load the configuration(_config) in WrapperService.init() you don't update "wrapper.pidfile". Could you please let me know I'm wrong?
Thanks in advance