For the purpose of running Jeremie and Jonas as a NT service I use
jsrvany from http://jsrvany.sourceforge.net/index.php.
The instructions on this site are very easy to follow, in a nutshell
here is what I did:
1. Place jvm.dll in the systems path and reboot for it to take effect.
(I added the directory c:\jdk1.3\jre\bin\hotspot to the path)
2. Create a wrapper class as described at
http://jsrvany.sourceforge.net/examples.php. See the attached
JonasWrapper.java.
3. Unzip the jsrvany distribution into the directory c:\labworks\bin
4. Copy the following jars into c:\labworks\lib:
JEREMIE_jonas.jar -- I use Jeremie, substitute for RMI_jonas.jar
if you use RMI
jsrvany.jar -- from the jsrvany distribution.
postgresql.jar -- I use postgresql, substitute with the jar
containing the appropriate jdbc classes for your rdbms.
labworks.jar -- my application (contains all my EJB's, supporting
classes and the above JonasWrapper)
5. Copy the following from %JONAS_ROOT%\config to c:\labworks\config:
java.policy
jndi.properties
jonas-users.properties
jonas.properties
jonathan.prop
PostgreSQL1.properties
trace.properties
6. From c:\labworks\bin run:
instsrv -n JOnAS -c labworks.ntservice.JonasWrapper -i
C:\labworks\bin\jsrvany.exe -p
C:\labworks\config;C:\labworks\lib\jsrvany.jar;C:\labworks\lib\postgresq
l.jar;C:\labworks\lib\JEREMIE_jonas.jar;C:\labworks\lib\labworks.jar
(the above is one command, i.e. entered on a single line)
7. Run Regedt32 and edit the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControllSet\Services\JOnAS\Parameters\J
VMOptions adding the following two lines:
-Djava.security.policy=C:\labworks\config\java.policy
-Dinstall.root=C:\labworks
That was it, hopefully you can adapt this to suit your application and
whatever Java/NT Service tool you choose to use.
Regards,
Calvin.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 7:35 PM
Subject: Re-2: Start/Stop Jonas running as NT Service.
> It would be very kind if that people that made JOnAS running as a
service unter WindowsNT would post their source code into the mailing
list. For JOnAS is open source it would be just fair to contribute that
code.
>
> Markus
>
JonasWrapper.java