Go to new doc!

+49 228 5552576-0


Windows Service Deployment

Using the free Java Service Wrapper from Tanuki Software, setting up Membrane API Gateway as a service requires the following steps:

1. Download Tanuki's Java Service Wrapper

For this example the Java Service Wrapper is required. Download the Community Version 3.5.7 and extract the archive to a directory of your choice e.g. C:\java\wrapper-windows-x86-32-3.5.7.

2. Set up the MEMBRANE_HOME System Variable

First of all a new environment variable must be set for the system, to know where the Membrane Service Proxy is installed.
Therefore open the System application in the Control Panel, go to Advanced and click on Environment Variables. Add a new system variable. Call it MEMBRANE_HOME and set its value to point the directory where Membrane Service Proxy is installed, e.g. C:\java\membrane-service-proxy-4.0.7.

3. Copy some Files

In this step some files have to be copied to the Membrane directory. To make things easier, Membrane comes with an Ant script that does the copying for us. If you are not familiar with Apache Ant you can also copy the required files manually (see below).

To run the Ant script open the command line and navigate to your MEMBRANE_HOME directory.
Type ant -file build-install-wrapper.xml and press enter. Please address your Service Wrapper directory after you'de be prompted to. Done!

4. (Un)-Registering the service

Now you are done with the configurations. Go to %MEMBRANE_HOME%\bin and run InstallMembrane-NT.bat to register the Membrane Service Proxy as a service.
Using other batch files you can unregister the service or start the service manually.

Congratulations: Membrane Service Proxy is now set up as a Service and will be started along with Windows. Use msconfig to adjust this behaviour.
To manually start/stop the serviceproxy service, open a command line and type:

  net start serviceproxy
  net stop serviceproxy
Attention: Remember to stop and unregister the service before making changes to the configuration.

5. Troubleshooting

If Membrane Service Proxy do not start up or the service doesn't register, check your environment variables. MEMBRANE_HOME must point to the directory where you installed Membrane Service Proxy. MEMBRANE_HOME must also be a system variable, user environment is not read when a program is started as service.

To make the wrapper more verbose, set wrapper.debug to true in conf/wrapper.conf.

(Alternative) 2. Copy the Files manually

If you want to avoid running the Ant script just copy and rename the files as follows:

From: To:
%WRAPPER_HOME%\bin\wrapper.exe %MEMBRANE_HOME%\bin\wrapper.exe
%WRAPPER_HOME%\src\bin\App.bat.in %MEMBRANE_HOME%\bin\Membrane.bat
%WRAPPER_HOME%\src\bin\InstallApp-NT.bat.in %MEMBRANE_HOME%\bin\InstallMembrane-NT.bat
%WRAPPER_HOME%\src\bin\UninstallApp-NT.bat.in %MEMBRANE_HOME%\bin\UninstallMembrane-NT.bat
%WRAPPER_HOME%\lib\wrapper.dll %MEMBRANE_HOME%\lib\wrapper.dll
%WRAPPER_HOME%\lib\wrapper.jar %MEMBRANE_HOME%\lib\wrapper.jar