|
From: <jea...@ca...> - 2005-08-25 14:06:46
|
It sounds like running your program as a service is not really what you
need. However, it is not too clear from your messages why you want your
process running as a service.
If you need a GUI for your service you will have to write a little
"client" that supplies that. Under Windows many of the little programs
with an icon in the system "tray" are exactly that.
Maybe a service is not what you need. If you just need something to start
before loggin you have some flexibility (under Windows) as to when you
start your process for example you can run a batch file before loggin.
See:
http://support.microsoft.com/kb/q243486/
You will probably find something equivalent for other OS.
JS
Message from "miraodb" <mi...@ho...>@lists.sourceforge.net
received on 08/23/2005 05:50 PM
08/23/2005 05:50 PM
"miraodb" <mi...@ho...>@lists.sourceforge.net
Please respond to wra...@li...
Sent by wra...@li...
To: <wra...@li...>
cc:
Subject: Re: [Wrapper-user] Start Batch or Exe as a service
Hi all,
thanks to all of you for your replies.
First of all, i want to apologize in advance for the long post i'm about
write.... :-)
At the first place i didn't that i couldn't run an executable or a batch.
but after reading the docu and the reply from you guyz, i undestood it's
not
possible.
So i create a java class (jar actually) that runs that batch. in that case
i
can wrap it up and launch it as a service.
It seemed to work fine, until i realised that it actuality the JVM was
kicked off and started over and over again coz the return value was 0.
So after chekcing the docu, i found the way to get rid of the restart JVM
using:
wrapper.max_failed_invocations=1
wrapper.successful_invocation_time=2000000000
wrapper.jvm_exit.timeout=0
After using this and running it in a console, i get this error:
C:\work\izpack\wrapper_win32_3.1.2\bin>TestWrapper.bat
wrapper | --> Wrapper Started as Console
wrapper | Using system timer.
wrapperp | server listening on port 32000.
wrapper | Launching a JVM...
wrapper | command:
"C:\j2sdk1.4.2_04\bin\java.exe" -Djava.library.path="../lib" -classpat
h
"../lib/StartAxiomServer.jar;../lib/wrapper.jar"
-Dwrapper.key="H_kdAVI5KNPfDf9B"
-Dwrap
per.port=32000 -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE"
-Dwrapper.version="
3.1.2" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10"
-Dwrapper.jvmid=1
Sta
rtAxiomServer
wrapper | JVM started (PID=10388)
wrapper | JVM process exited with a code of 0, leaving the wrapper exit
code set to 0.
wrapper | JVM exited while loading the application.
wrapper | JVM was only running for 0 seconds leading to a failed restart
count of 1.
wrapper | There were 1 failed launches in a row, each lasting less than
2000000000 second
s. Giving up.
wrapper | There may be a configuration problem: please check the logs.
wrapper | <-- Wrapper Stopped
So this prevent the JVM to restart and launch again my batch, but it also
obvioulsy kills the JVM. My servers are running since the batch was
launched
once.
However if i create the service using the InstallApp-NT.bat, then when i
click in start in the windows service GUI for my service, i get the
following error:
Could not start the Test service on local computer.
The service did not return an error. this could be an internal windows
error
or an internal service error.
If the problem persist, contact your system admin.
I'm a bit stocked and it's all brand new for me.
Any help would be just great.
Thanks in advance.
fabrice
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|