YAJSW Configuration Parameters. YAJSW Configuration Properties. Introduction. General Notes. Accessing Environment Properties. Includes. Conditional Includes. Groovy Expressions. Multiple Lines. Lists and arrays. Multiple Value Properties. Classpath Wildcards. New Configuration Properties. New Optional Configuration Properties. Configuration Properties from tanuki software. Introduction. In order to wrap an application you will either need to create a. It is recommended to create a configuration file and store it in the < yajsw> /conf folder. You can create a configuration file for a running application by using the configuration generator. In the following we describe the configuration properties. NOTE: this description applies only. It does not apply. General Notes"\" is the escape character. For file paths it is. If back- slash is required use "\\"."," is used as list delimiter. If required you will have to escape it. For windows %SOME_ENV_VAR% will not work. You will have to use. SOME_ENV_VAR}Example. Xdebug. - Xrunjdwp: transport=dt_socket\,server=y\,suspend=y\,address=1. JNA_HOME}/binwrapper. NOTE: ${abc. efg} is similar to ${abc. Xdebug. - Xrunjdwp: transport=dt_socket\,server=y\,suspend=y\,address=1. Xdebug. wrapper. java. Xrunjdwp: transport=dt_socket\,server=y\,suspend=y\,address=1. Accessing Environment Properties. If you defined OS environment variables you may access these directly. Example (Windows)set wrapper_java_path=c: /java/jdk. NOTE: Windows: environment variables are converted to lower case. Therefore event if you use PATH on your computer you have too. Includes. If a property is named "include" and the value. For older documents not applicable for current development, see Retired Documents Library. Note When the ASA is configured for clientless SSL VPN, you cannot enable security contexts (also called firewall multimode) or Active/Active stateful failover.
Example: tomcat_start. Conditional Includes. Some applications require different configurations for different. This can be achieved by. As example, our application. We determine these from the System. Per supported os and arch we create a configuration filenamed < os. Within our configuration file we define include as follows. The file Windows XP. Dlib=w. 86. dll. Whereas the file. Linux. x. 86. confdefineswrapper. Dlib=l. 86. iso. Groovy Expressions. Alternatively to conditional includes, one may use groovy scripts.${ expr } are interpreted as groovy expressions which are evaluated. Example: wrapper. Lower. Case(). starts. With("windows")) "libw. Lower. Case(). starts. With("linux")) "libl" }YAJSW includes a util binding for getting user input: util. CLI(String) prints the given message to the wrapper process console and waits for the user input. Try. Icon(String) displays the given message on the system tray icon and waits for the user input. The user will have to click the respond button in the tray icon menue and enter the required data. Example: wrapper. CLI('please enter password for winods service user')}wrapper. Try. Icon('please enter password for winods service user')}Multiple Lines. For readability properties may be formatted on multiple lines. Example: wrapper. ABORT=scripts/send. Mail. gvwrapper. script. ABORT. args=somebody@help. Lower. Case(). starts. With("windows")) \"libw. Lower. Case(). starts. With("linux")) \"libl"; \}Lists and arrays. Commons Configuration has the ability to return easily a list of. For example a properties file can contain a list of comma. NOTE. currently please do not use lists. This will be supported in a later version. Multiple Value Properties. Multiple Value Properties are configuration properties which require. In the tanukisoftware wrapper < n> must be a number and. For YAJSW < n> may be a number or string. The numbers do. not have to be sequential. Nor do they need to be unique. Ordering is done by the natural alpha numeric ordering. In case of. parameters with the same key ordering is random. Examplewrapper. java. Classpath Wildcards. YAJSW. supports wildcard for files as well as folders. However recursive wild. For wildcard syntax refer to apache. Note that in YAJSW wildcards are used differently then in java. In java lib/* denotes all . In YAJSW this. will denote all files in the lib folder. To denote the jar files in a. Examples. wrapper. NOTE: The colors in the sequel are defined as follows: Implemented. Currently undecided. Currently not Implemented. May be implemented in a. Currently not Implemented. Will probably NOT be. The meaning of the property has changed. Minor change to the meaning of the property. New Configuration Properties. Property Name. Comments wrapper. In case a java application is started with the "- jar". Example: wrapper. This will start the following java application : "java - jar wrapper. The main class of the application. This. is not required in the tanuki software wrapper. For compatibility it is. However passing the main class as. I find that it is better to. Start. a groovy script as an application. Example: wrapper. Web. Services. gvwrapper. Native image to start. Example: wrapper. There. are applications such as tomcat which are stopped by invoking a. System. exit() from within the application. If. this property is defined and the specified conf file is found, the. If the application is not stopped within the given timeout it is killed. Example: within the file tomcat. Shutdown. Tomcat# for all other properties. Default: no stopper configuration. This. property indicates that this is a stopper application, for stopping. It overrides properties as following and removes all. SHUTDOWNExamplewrapper. Default: falsewrapper. There. are java applications, such as servers which run a separate thread. Other applications should terminate with an exit code. This property defines the exit code. If this property is > - 1, System. Example: wrapper. Default: - 1, eg the application will not be terminated once. The main method may throw an exception. In this case the application can be terminated with an exit code or may continue to run. This property defines the exit code in case of an exception. If this property is > - 1 System. Default: 9. 99, eg the application will terminate with exit code 9. For Posix OS: Directory in which to create and execute. Default: /etc/init. For Posix OS: Directory where to store the. Default: /var/runwrapper. For Posix OS: Velocity. Default: < templates> /daemon. CHANGED since beta 1. For Posix OS: Directory in which to create. K.. and S.. links. Default: < wrapper. X. d. Example 1: For Ubuntu: wrapper. X. dwill create the links /etc/rc. K9. 9< wrapper. S9. 9< wrapper. For Posix OS: This. Per default creates links for stop runevels 0, 1, 6 and start runlevels 2, 3, 4, 5 with priority 2. NOTE the difference: no closing "." is required. NOTE: uninstall the daemon using < yajsw> /bat/uninstall. Daemon. sh before changing the property wrapper. If. you change any of these properties while the daemon is installed or. Different Priorities for start and stop: wrapper. In this case the following links are created: /etc/init. K8. 0< service name> /etc/init. K8. 0< service name> /etc/init. K8. 0< service name> /etc/init. S2. 0< service name> /etc/init. S2. 0< service name> /etc/init. S2. 0< service name> /etc/init. S3. 0< service name> wrapper. DEPRECATED since beta- 1. For Posix OS: the link K.. will be named. K< wrapper. daemon. Default: 9. 9wrapper. DEPRECATED since beta- 1. For Posix OS: the link S.. will be named. S< wrapper. daemon. Default: 9. 9wrapper. For. Mac OS X daemons: Directory into which the launchd. Default. ~Library/Launch. Agentswrapper. plist. For. Mac OS X daemons: Velocity template. Default: < templates> /launchd. For Windows: if set to false the wrapper will not report service startup to the windows service manager. Instead the application is expected to call Wrapper. JVMMain. WRAPPER_MANAGER. Service. Startup(). The wrapper will report to the windows service manager as. If the application does not invoke report. Service. Startup() within this timeout the service is stopped. Default: true. In this case the wrapper will not wait for the application to startup and will notify the service manager as soon as possible. Exit Code of the application when the stop method has. Default: 0wrapper. Exit. Code of the application when the stop method did not stop the. Default: 9. 99wrapper. Exit Code of the application in case it could not be. Exception. Default: 9. Depending on the application there are use cases where the. For example in case the wrapper continues to. In other cases such as important server applications you may. The wrapper may then be restarted so that it. With the this property one may control how the wrapper and the application are coupeled. LOOSE . application will continue running when the controller is. TIGHT. application will terminate if controller terminates and. Application will not be terminated if the controller is terminated. APPLICATION. application will be terminated if the contrloler terminates. Controller. will not be terminated if the application is terminated. In. case a timer or condition is active, the controller is not stopped. In. this cases you may consider calling System. Default: TIGHT wrapper. Name of a groovy script which is called whenever the owner of the group of the cluster changes. By calling System. COMPUTERNAME"). equals(process. Node) within the script one may check if the current node is the active node. In case the script should be invoked only for specific groups one may add the list of groups to the property wrapper. NOTE: do not define this property if the wrapper is not running on a cluster, as this will crash the JVM. NOTE: this property is only valid for windows OS and requires Clus. Api. dll. NOTE: the first call to Wrapped. Process. start() will not start the. One may thus make sure that. Root folder for classpath files and for resource files. Supports file systems supported by commons VFSExamples: wrapper. Cache directory to which files are copied. Example: wrapper. Indicates if local files are copied to wrapper. Default: false. Example: wrapper. Defines files which should be copied to the cache: Examples: wrapper. Defines an environment variable which is set when executing the application. Example: wrapper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2016
Categories |