Running LiveCycle on JBoss as a 64-bit Windows Service

In most Windows server environments, it is almost a necessity that JBoss be run as a Windows service that is configured to auto-start and auto-stop on Windows start and stop. Free tools have existed for 32-bit Windows/Java environments for some time but not for 64-bit environments. “JBoss Web Native Connectors” that were released by JBoss for JBoss 5.0 can now be used for JBoss 4.2 as well.

The following instructions also work for Windows Server 2008 64-bit although LiveCycle ES 8.2 is currently not supported on it.

1) Download the JBoss Web Native Connector for 64-bit Windows (“binaries 2.0.x-windows” – “jboss-native-2.0.x-windows-x64-ssl.zip”) from here.

2) Unzip the downloaded file. Copy all contents of the \bin\ folder (except the \native\ folder) to the \bin\ folder of your JBoss.

Edit service.bat

3) Make sure that the variables for Service Name (SVCNAME), Service Display (SVCDISP) and Service Description (SVCDESC) have values that reflect your JBoss environment. For example:
set SVCNAME=JBAS42SVC
set SVCDISP=JBossAS 4.2 for Adobe LiveCycle ES 8.2
set SVCDESC=JBoss Application Server Community Edition 4.2.0 GA/Platform: Windows x64

4) In the :cmdStart section, make sure that the call run.bat line is enhanced with the configuration name (“all” in this example) and bind IP address (0.0.0.0 for binding to all of the server’s IP addresses) such as follows:
call run.bat -c all -b 0.0.0.0 > run.log 2>&1

5) Repeat the same for the :cmdRestart section:
call run.bat -c all -b 0.0.0.0 > run.log 2>&1

6) Save the file.

7) From the \bin folder of JBoss, create the Windows service using the following command:
service.bat install

If the command worked, you will get a response such as:
Service JBossAS 4.2 for Adobe LiveCycle ES 8.2 installed

8) Check the Services applet in Windows Control Panel for a new service listed as “JBossAS 4.2 for Adobe LiveCycle ES 8.2″ which is the value of the SVCDISP variable in service.bat

9) Using the Services applet in Windows Control Panel, set the ‘Startup type” to “Automatic”.

10) In the “Recovery” tab, set First failure and Second failure recovery options such as “Restart the Service” and “Restart the Computer” respectively.

11) If needed, change the “Logon as” value from the default “Local System” account to another user or service account.

Verification

1) Start the service from the Services applet in Windows Control Panel

2) Watch (tail) the server.log to make sure that the service starts successfully.

3) Shutdown the service from the Services applet in Windows Control Panel and verify that it gets shut down successfully.

4) Make sure that a service re-start from the Services applet in Windows Control Panel also works.

Additional configuration can be performed using either the Services applet in Windows Control Panel or by using the built-in Windows Service Configuration utility (sc). From a command prompt, run the following command for additional details:
sc /help

For example, if the database service runs on the same machine instance, you can create a dependency on that service with the following command:
sc config JBAS42SVC depend= MSSQL$MYSERVER
where MSSQL$MYSERVER is the SVCNAME of the Microsoft SQL Server 2005 service running on the same server instance. Please note that there should NOT be any space before the = sign but there should be a space after the = sign. This is very important.

If successful, you will get a response such as follows:
[SC] ChangeServiceConfig SUCCESS

The same can be achieved by editing the Windows registry. See blog entry by Adobe’s John Cummins.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)
This entry was posted in Adobe LiveCycle ES, General Interest and tagged . Bookmark the permalink.

3 Responses to Running LiveCycle on JBoss as a 64-bit Windows Service

  1. Kim Christensen says:

    This guide was VERY helpful – thanks a lot Jayan\Kim

  2. prakash says:

    Hi thanks. It’s very use full for me.
    Does it have any drawback compared to the Java service wrapper…?
    Because, they mentioned it’s native code ….

    • Jayan Kandathil says:

      Prakash:

      None that I know of. No matter how you create the service, once it is created, it runs like any other Windows service.