This section describes how to set up the jWebSocket Server so that it runs as a Windows Service, e.g. on a Windows 2003 or 2008 Server. It was also tested on both 32bit and 64bit versions of Windows XP and Windows 7. This topic will be interesting for you when you intend to run the jWebSocket Server on a dedicated production system.
Although it might look simple to run the jWebSocketServer32/64-<version>.exe as a stand-alone server by simply double-clicking it or putting a short-cut to it into the Windows auto-start group, a drawback is that normal desktop applications are terminated when you log off the system. Unlike usual applications, services remain running in the background even when you log off. Thus on a desktop "server" you need to remain logged in to run the jWebSocket Server which, of course, is not recommended due to security and reliability reasons.
To run the jWebSocket server without being logged in you either can run it as a Windows service by using the jWebSocketService32/64-<version>.exe (described below) or alternatively embed it into a web application which is described here.
Before you run the jWebSocket Windows Executable please ensure that you have a working jWebSocket Server installation as described here.
Installing and Uninstalling the jWebSocket Service
To run the jWebSocket Server as a Windows Service please follow the following steps.
Tips and Tricks
In case you get an error message like "Could not open SCManager." during the installation of the Windows Service this might be related to missing access rights or due to too restrictive User Access Control (UAC) settings.
In the console you can type:
runas /profile /user:administrator
to run the service installer as Administrator.
Copyright © 2013 Innotrade GmbH. All rights reserved.