网址:wrapper.tanukisoftware.org/doc/english/introduction.html
该工具主要用于包装其他java服务器端程序(比如tomcat,或者自己开发的java服务器程序),提供如下特性:
以下为我在window系统测试的配置文件,放于此以备以后参考:
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
#set.JAVA_HOME=$JAVA_HOME
wrapper.java.command=java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/wrappertest.jar
wrapper.java.classpath.3=../bin/.
wrapper.java.classpath.4=../bin/monitorServe.jar
wrapper.java.classpath.5=../lib/*
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib
# Java Additional Parameters
wrapper.java.additional.1=-Dprogram.name=monitorServe.bat
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=640
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=com.starnet.windon.core.DmonitorServe
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=../logs/monitor.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=5m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0
wrapper.console.title=Dmonitor serve
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=monitor
# Display name of the service
wrapper.ntservice.displayname=Dmonitor Server
# Description of the service
wrapper.ntservice.description=Dmonitor Server
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
该工具主要用于包装其他java服务器端程序(比如tomcat,或者自己开发的java服务器程序),提供如下特性:
- 作为windows服务或者unix守护进程运行;
- 增强程序的可靠性,程序崩溃后的自动重启,比如内存溢出,虚拟机崩溃等造成JVM退出的监控和恢复运行(重新启动);
- 标准的,可独立使用的配置JVM参数的脚本;
- 支持java应用程序重启JVM,比如应用程序修改了配置文件,或者重启系统避免内存溢出等问题;
- 灵活的配置;
- 简化应用程序的安装;
- 记录日志。
以下为我在window系统测试的配置文件,放于此以备以后参考:
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
#set.JAVA_HOME=$JAVA_HOME
wrapper.java.command=java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/wrappertest.jar
wrapper.java.classpath.3=../bin/.
wrapper.java.classpath.4=../bin/monitorServe.jar
wrapper.java.classpath.5=../lib/*
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib
# Java Additional Parameters
wrapper.java.additional.1=-Dprogram.name=monitorServe.bat
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=640
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=com.starnet.windon.core.DmonitorServe
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=../logs/monitor.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=5m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0
wrapper.console.title=Dmonitor serve
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=monitor
# Display name of the service
wrapper.ntservice.displayname=Dmonitor Server
# Description of the service
wrapper.ntservice.description=Dmonitor Server
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false