Document ID: 115647
Updated: Jan 10, 2013
Contents
Introduction
This document describes how to configure a JBoss 7 Server as a Windows service, for use with Cisco Cloud Portal.
This configuration allows JBoss Server to start automatically, as a background process, whenever the Windows Server boots. The process does not require a logged-in user to initiate it, and so will not be killed if that user logs off. It will also restart automatically if the Windows Server reboots.
Before You Begin
Requirements
Readers of this document should have knowledge of these topics.
-
Windows Server operating system
-
Internet Information Services
Components Used
The information in this document is based on these hardware and software versions:
-
Windows Server 2008 R2
-
IIS 7.5
-
Jboss 7.1.1.Final
-
Cisco Service Portal, release 9.4 or later
Conventions
For more information on document conventions, refer to Cisco Technical TipsConventions.
Configuring the Service
Ensure you have administrator access to the Windows server on which JBoss is installed, and that you have a text editor that supports search and replace (such as Notepad). It is also handy, although not required, for the server to have unrestricted web access.
Procedure
Complete these steps:
-
On the www.jboss.org/jbossweb/downloads web site, search for the current packages of the "Jboss Web Native Connectors", and download the binaries appropriate for the Windows operating system you are using. For example, if the current package is at release 2.0.10, then download the zip file for binaries 2.0.10-windows x64.
-
Unzip the downloaded archive file to the JBoss root directory. For example:
C:\jboss-as-7.1.1.Final
If prompted to do so, overwrite any existing files with the same names.
-
Use your text editor to open the service.bat file under the <JBOSS_ROOT>\bin directory. Save a copy of the file as service.old so you have a backup.
-
Set the SVCNAME, SVCDISP and SVCDESC properties to something meaningful. For example:
set SVCNAME=JBoss7server set SVCDISP=JBoss Server for CSP release X set SVCDESC=JBoss AS 7.1.1.Final - Windows x64 - CSP release X
-
Comment out the JAVA_OPTS property by adding REM to the beginning of the line. For example:
REM set JAVA_OPTS=-X
-
Replace all occurrences of run.bat with standalone.bat.
-
Replace all occurrences of run.log with standalone.log.
-
Replace all occurrences of the command
-
call shutdown -S < .s.lock >> shutdown.log 2>&1
with this command
-
call jboss-cli.bat --connect --command=:shutdown >> shutdown.log 2>&1
-
-
Save the modified service.bat file.
-
Launch the Windows command line and execute the following command to install and register the "JBoss Server for CSP release X" service:
service.bat install
-
Open Server Manager > Configuration > Services and verify that the "JBoss Server for CSP release X" service was registered.
-
(Optional) Change the Startup Type for this service to Automatic.
-
Start the "JBoss Service for CSP release X" service.
-
Check the log file <JBOSS_ROOT>\bin\standalone.log to verify that the JBoss server started up successfully.
Related Information
Open a Support Case (Requires a Cisco Service Contract.)
Related Cisco Support Community Discussions
The Cisco Support Community is a forum for you to ask and answer questions, share suggestions, and collaborate with your peers.
Refer to Cisco Technical Tips Conventions for information on conventions used in this document.