Windows Service

This tutorial describes the required steps to configure IAM.tfopen in new window Server as a Windows OS service.

Prerequisites

Installing the Service

Verify Java Install

IAM.tfopen in new window Uses an OS service wrapper to start, that is not compatible with executables installed in paths tha use spaces. This requires that Java is installed in a different folder than the default (C:\Program Files\Java). One option would be to install it at C:\atricore\Java, and this is the value we'll use during this tutorial.

Setup JOSSO Service

Install JOSSO Service Wrapper

Now that Java is installed in the proper location, we can start IAM.tfopen in new window again and setup the service wrapper. For that all we have to do is run the wrapper:install command on IAM.tfopen in new window's command line. This is what the output looks like:

karaf@iamtf>wrapper:install
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\netty
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\jna
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\groovy
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\yajsw
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\regex
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\extended
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\extended\velocity
Creating missing directory: C:\atricore\iamtf-1.0.0\lib\wrapper\templates
Creating file: C:\atricore\iamtf-1.0.0\bin\installService.bat
Creating file: C:\atricore\iamtf-1.0.0\bin\uninstallService.bat
Creating file: C:\atricore\iamtf-1.0.0\bin\wrapper-setenv.bat
Creating file: C:\atricore\iamtf-1.0.0\bin\wrapper.bat
Creating file: C:\atricore\iamtf-1.0.0\etc\josso2-wrapper.conf
Creating file: C:\atricore\iamtf-1.0.0\etc\josso2-wrapper-stop.conf
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\wrapper.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\wrapperApp.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\netty\netty-3.2.4.Final.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\jna\jna-3.3.0.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\jna\jnacontrib-platform-3.3.0.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-configuration-1.7-SNAPSHOT.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-vfs-2.0-SNAPSHOT.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\groovy\groovy-all-1.8.0.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-httpclient-3.0.1.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-codec-1.3.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-collections-3.2.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-io-1.3.1.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-lang-2.4.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-logging-1.1.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\commons\commons-cli-2-SNAPSHOT.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\yajsw\ahessian.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\core\regex\jrexx-1.1.1.jar
Creating file: C:\atricore\iamtf-1.0.0\lib\wrapper\lib\extended\velocity\velocity-1.6.3.jar

Setup complete.  You may want to tweak the JVM properties in the wrapper configuration file:
        C:\atricore\iamtf-1.0.0\etc\josso2-wrapper.conf
before installing and starting the service.

To install the service, run:
  C:> C:\atricore\iamtf-1.0.0\bin\installService.bat

Once installed, to start the service run:
  C:> net start "josso2"

Once running, to stop the service run:
  C:> net stop "josso2"

Once stopped, to remove the installed the service run:
  C:> C:\atricore\iamtf-1.0.0\bin\uninstallService.bat remove

karaf@iamtf>

==== Configure Windows Service

Now that the wrapper has been installed, the next step is to add IAM.tfopen in new window as an OS service. Stop IAM.tfopen in new window and open a new Windows command line as Administrator. Access IAM.tfopen in new window bin folder (i.e. C:\atricore\iamtf-1.0.0\bin) and you will find a new file: installService.bat.

C:\atricore\iamtf-1.0.0\bin>installService.bat

C:\atricore\iamtf-1.0.0\bin>cd C:\atricore\iamtf-1.0.0\bin\

C:\atricore\iamtf-1.0.0\bin>call wrapper-setenv.bat
"java" -Xmx30m -jar "C:/atricore/iamtf-1.0.0/lib/wrapper/wrapper.jar" -i "C:/atricore/iamtf-1.0.0/etc/josso2-wrapper.conf"

Jul 20, 2015 8:38:34 AM org.apache.commons.vfs.VfsLog info
INFO: Using "C:\Users\ADMINI~1\AppData\Local\Temp\vfs_cache" as temporary files store.
************* INSTALLING josso2 ***********************

Service josso2 installed
Press any key to continue . . .

C:\atricore\iamtf-1.0.0\bin>

Tips

If you need to uninstall the service, you can run the uninstallService.bat script as administrator.

Start JOSSO Using Windows Service Manager

You can now open the Windows Services manager and look for the Atricore IAM.tfopen in new window Service to start IAM.tfopen in new window.

josso-win-svc.png
josso-win-svc.png

Information about JOSSO and the wrapper can be found in the following log files:

  • IAMTF_HOME\data\log\atricore.log
  • IAMTF_HOME\data\log\wrapper.log.
Last Updated:
Contributors: Sebastian