JavaServiceWrapper
Windows platform integration of Tanuki Software's Java Wrapper Service facility
- Overview
- Design
- Constraints
- Attributes
- Commands
-
Related Types
- JavaServiceWrapperSetting
- JavaServiceWrapperJavaHome
- JavaServiceWrapperJavaMainClass
- JavaServiceWrapperJavaClassPath
- JavaServiceWrapperJavaAdditional
- JavaServiceWrapperJavaInitMemory
- JavaServiceWrapperJavaMaxMemory
- JavaServiceWrapperAppParameters
- JavaServiceWrapperConsoleTitle
- JavaServiceWrapperNtServiceName
- JavaServiceWrapperNtServiceDisplayName
- JavaServiceWrapperNtServiceDescription
- JavaServiceWrapperNtServiceStartType
- JavaServiceWrapperNtServiceInteractive
- JavaServiceWrapperNtServiceAccount
- JavaServiceWrapperNtServicePassword
Overview
JavaServiceWrapper: Windows platform integration of Tanuki Software's Java Wrapper Service facility
This type manages the Tanuki Software Java Wrapper Service, and allows a dependent Service object to be automatically deployed.
A JavaServiceWrapperZip object should be added as a child dependency.
A Service object should also be added as a child dependency.
Appropriate Settings should be added to JavaServiceWrapper object to configure the appropriate Java based configuration to run the underlying Service.
An example of using JavaServiceWrapper for managing the JBossServer type is here: Windows service example.
Design
- Super Type
- Service
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Notification | false |
Template Directory | |
Data View | Children, proximity: 1 |
Logger Name |
Constraints
Allowed Child Dependencies
- JavaServiceWrapperAppParameters 1
- JavaServiceWrapperConsoleTitle 1
- JavaServiceWrapperJavaAdditional 1
- JavaServiceWrapperJavaClassPath 1
- JavaServiceWrapperJavaHome 1
- JavaServiceWrapperJavaInitMemory 1
- JavaServiceWrapperJavaMainClass 1
- JavaServiceWrapperJavaMaxMemory 1
- JavaServiceWrapperNtServiceDescription 1
- JavaServiceWrapperNtServiceDisplayName 1
- JavaServiceWrapperNtServiceInteractive 1
- JavaServiceWrapperNtServiceName 1
- JavaServiceWrapperNtServiceStartType 1
- JavaServiceWrapperZip 1
- Service1
1: These types have a Singleton constraint. Only one instance may be added as a resource.
Allowed Parent Dependencies
- Node
- Site
Attributes
Exported Attributes
Name | Property | Description |
---|---|---|
installRoot | deployment-install-root | The deployment-install-root is exported as the "installRoot" attribute. It is used to default the -installroot option in many commands. |
Defaults for Imported Attributes
Name | Default |
---|---|
javaServiceWrapperConsoleTitle | Test Wrapper Sample Application |
javaServiceWrapperJavaHome | ${env.JAVA_HOME} |
javaServiceWrapperJavaInitMemory | 3 |
javaServiceWrapperJavaMainClass | org.tanukisoftware.wrapper.WrapperSimpleApp |
javaServiceWrapperJavaMaxMemory | 64 |
javaServiceWrapperNtServiceDescription | Test Wrapper Sample Application Description |
javaServiceWrapperNtServiceDisplayName | Test Wrapper Sample Application |
javaServiceWrapperNtServiceInteractive | false |
javaServiceWrapperNtServiceName | testwrapper |
javaServiceWrapperNtServiceStartType | AUTO_START |
Commands
Deploy
Run the service deployment cycle, stopping, unconfiguring, installing package dependencies, installing the dependent Service, and configuring and the starting the service. .
This implementation overrides the default Deploy command to insert the Service-Install command after the Packages-Install command. This allows the JavaServiceWrapper object to perform selective parts of the normal Deploy workflow for its dependent Service child, without invoking the normal Start and Stop lifecycle commands for the Service.
The JavaServiceWrapper's Start and Stop commands invoke the Tanuki Software Java Service Wrapper start/stop commands, which invoke the Windows Service management operations to directly start or stop the underlying Java based Service software.
- Usage
- Deploy
Workflow
- Stop
- Remove
- Packages-Install
- Service-Install
- Configure
- Add
- Start
Add
Add the Java Service Wrapper Windows service if it is not already installed.
This workflow idempotently registers this object as a Windows service using the Tanuki Java Service Wrapper software.
- Usage
- Add
Workflow
Error Handler
Command |
Remove
Remove the Java Service Wrapper Windows service if it is installed.
This workflow idempotently de-registers this object as a Windows service using the Tanuki Java Service Wrapper software.
- Usage
- Remove
Workflow
Error Handler
Command |
Service-Install
Install a dependent Service object without starting it directly
This workflow command dispatches the necessary commands to the dependent Service object to install it: Install, Packages-Install, and Configure.
- Usage
- Service-Install
Workflow
dispatchServiceInstall
Dispatch the Install command to a dependent service object
Dispatch the "Install" command to a dependent Service.
- Usage
- dispatchServiceInstall
dispatchServiceConfigure
Dispatch the Configure command to a dependent service object
Dispatch the "Configure" command to a dependent Service.
- Usage
- dispatchServiceConfigure
dispatchServicePackagesInstall
Dispatch the Packages-Install command to a dependent service object.
Dispatch the "Packages-Install" command to a dependent Service.
- Usage
- dispatchServicePackagesInstall
Docs-Generate
Generate the server properties file
Generates the wrapper.conf file based on the Settings and attribute defaults of this object.
- Usage
- Docs-Generate [-installroot <>] [-packagebase <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
addService
Add the Java Service Wrapper Windows service to the system
Directly registers the Windows service using the Java Service Wrapper software.
- Usage
- addService [-installroot <>] [-packagebase <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
removeService
Remove the Java Service Wrapper Windows service from the system
Directly de-registers the Windows service using the Java Service Wrapper software.
- Usage
- removeService [-installroot <>] [-packagebase <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
assertServiceIsUp
Check whether the Java Service Wrapper Windows service is up
Queries the state of the Windows service using the Java Service Wrapper software, and fails if the state is not "running".
- Usage
- assertServiceIsUp [-installroot <>] [-packagebase <>] [-servicename <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
servicename | Java wrapper service wrapper Windows service name |
assertServiceIsDown
Check whether the Java Service Wrapper Windows service is down
Queries the state of the Windows service using the Java Service Wrapper software, and fails if the state is "running".
- Usage
- assertServiceIsDown [-installroot <>] [-packagebase <>] [-servicename <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
servicename | Java wrapper service wrapper Windows service name |
assertServiceIsInstalled
Check whether the Java Service Wrapper Windows service is installed
Queries the state of the Windows service using the Java Service Wrapper software, and fails if the state is not "installed".
- Usage
- assertServiceIsInstalled [-installroot <>] [-packagebase <>] [-servicename <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
servicename | Java wrapper service wrapper Windows service name |
assertServiceIsNotInstalled
Check whether the Java Service Wrapper Windows service is not installed
Queries the state of the Windows service using the Java Service Wrapper software, and fails if the state is "installed".
- Usage
- assertServiceIsNotInstalled [-installroot <>] [-packagebase <>] [-servicename <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
servicename | Java wrapper service wrapper Windows service name |
startService
Start the Java Service Wrapper Windows service
Directly starts the Windows service using the Java Service Wrapper software.
- Usage
- startService [-installroot <>] [-packagebase <>] [-servicename <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
servicename | Java wrapper service wrapper Windows service name |
stopService
Stop the Java Service Wrapper Windows service
Directly stops the Windows service using the Java Service Wrapper software.
- Usage
- stopService [-installroot <>] [-packagebase <>] [-servicename <>]
Options
Option | Description |
---|---|
installroot | Java wrapper service wrapper home directory |
packagebase | Java wrapper service wrapper package installation directory |
servicename | Java wrapper service wrapper Windows service name |
Related Types
The following types are defined for use with JavaServiceWrapper.
JavaServiceWrapperSetting
Overview
JavaServiceWrapperSetting: Java Service Wrapper configuration setting
This abstract Setting subtype is the supertype for all JavaServiceWrapper Setting types.
Design
- Super Type
- Setting
Role | Abstract. (Objects cannot be created.) |
Instance Names | Unique |
JavaServiceWrapperJavaHome
Overview
JavaServiceWrapperJavaHome: Value of JAVA_HOME for the Java Service Wrapper
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperJavaHome | settingValue |
JavaServiceWrapperJavaMainClass
Overview
JavaServiceWrapperJavaMainClass: Class implementing the Java Service Wrapper WrapperListener interface
The main class to set with this Setting is most often one provided by the Tanuki software, such as "org.tanukisoftware.wrapper.WrapperSimpleApp", unless target Java software to manage has its own implementation.
See: Java Service Wrapper - Integration Methods.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperJavaMainClass | settingValue |
JavaServiceWrapperJavaClassPath
Overview
JavaServiceWrapperJavaClassPath: A list of additional CLASSPATH elements for the Java Service Wrapper, comma separated
The comma-separated java class paths for this Setting will be added to a default set which includes the necessary jars for the Tanuki service wrapper software.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperJavaClassPath | settingValue |
JavaServiceWrapperJavaAdditional
Overview
JavaServiceWrapperJavaAdditional: A list of additional JAVA_OPTS for the Java Service Wrapper, space separated
The values are split at the space characters and generated into the wrapper.conf file as separate numbered properties.
See: wrapper.java.additional<n> Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperJavaAdditional | settingValue |
JavaServiceWrapperJavaInitMemory
Overview
JavaServiceWrapperJavaInitMemory: Initial Java heap size in MB for the Java Service Wrapper
Used in the wrapper.conf configuration file.
See: wrapper.java.initmemory Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperJavaInitMemory | settingValue |
JavaServiceWrapperJavaMaxMemory
Overview
JavaServiceWrapperJavaMaxMemory: Maximum Java heap size in MB for the Java Service Wrapper
Used in the wrapper.conf configuration file.
See: wrapper.java.maxmemory Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperJavaMaxMemory | settingValue |
JavaServiceWrapperAppParameters
Overview
JavaServiceWrapperAppParameters: Application commandline parameters for the Java Service Wrapper, space separated.
The value should be a space separated list of parameters to pass to the main class defined with a JavaServiceWrapperJavaMainClass Setting object.
When the JavaServiceWrapperMainClass value is "org.tanukisoftware.wrapper.WrapperSimpleApp", then the value of this setting should be the Main class name of the target Java application, followed by the commandline parameters separated by spaces.
For example:
org.myapp.Main -param value
See: Java Service Wrapper - Integration Methods.
See: wrapper.java.mainclass Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperAppParameters | settingValue |
JavaServiceWrapperConsoleTitle
Overview
JavaServiceWrapperConsoleTitle: Title to use when running the Java Service Wrapper as a console
If configured to run in a console window, this will be the title given to the window.
See: wrapper.console.title Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperConsoleTitle | settingValue |
JavaServiceWrapperNtServiceName
Overview
JavaServiceWrapperNtServiceName: Identifying Name of the Java Service Wrapper Windows service
This is the identifier used by Windows, and should be unique among all Windows Service. Make sure that all JavaServiceWrapper objects have different values for this setting.
See: wrapper.ntservice.name Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property | Description |
---|---|---|
javaServiceWrapperNtServiceName | settingValue | This attribute is used by the lifecycle commands of JavaServiceWrapper to uniquely identify the Windows Service that is being managed. |
JavaServiceWrapperNtServiceDisplayName
Overview
JavaServiceWrapperNtServiceDisplayName: Displayed name of the Java Service Wrapper Windows service
See: wrapper.ntservice.displayname Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperNtServiceDisplayName | settingValue |
JavaServiceWrapperNtServiceDescription
Overview
JavaServiceWrapperNtServiceDescription: Description of the Java Service Wrapper Windows service
See: wrapper.ntservice.description Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperNtServiceDescription | settingValue |
JavaServiceWrapperNtServiceStartType
Overview
JavaServiceWrapperNtServiceStartType: Mode in which the Java Service Wrapper Windows service is installed. AUTO_START or DEMAND_START.
See: wrapper.ntservice.starttype Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Allowed Property Values
Property | Allowed Values | Default | Enforced |
---|---|---|---|
settingValue |
|
|
true |
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperNtServiceStartType | settingValue |
JavaServiceWrapperNtServiceInteractive
Overview
JavaServiceWrapperNtServiceInteractive: Whether or not to allow the Java Service Wrapper Windows service to interact with the desktop. (true/false)
See: wrapper.ntservice.interactive Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Allowed Property Values
Property | Allowed Values | Default | Enforced |
---|---|---|---|
settingValue |
|
|
true |
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperNtServiceInteractive | settingValue |
JavaServiceWrapperNtServiceAccount
Overview
JavaServiceWrapperNtServiceAccount: Account to use with the Java Service Wrapper Windows service.
See: wrapper.ntservice.account Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperNtServiceAccount | settingValue |
JavaServiceWrapperNtServicePassword
Overview
JavaServiceWrapperNtServicePassword: Password to use with the Java Service Wrapper Windows service.
See: wrapper.ntservice.password Property.
Design
- Super Type
- JavaServiceWrapperSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaServiceWrapperNtServicePassword | settingValue |