Tanuki Service Wrapper는 linux daemon 처럼 쓸 수 있다.

기능은 다음과 같다.

In addition to supporting Java Service Wrapper development, get access to professional features:

  • Alert emails (Professional): Sleep safe at night knowing that you will be notified by email whenever anything happens with your application.
  • Event commands (Professional): Get the ability to execute arbitrary system commands in response to a wide range of JVM and Wrapper state changes.
  • Timed events (Professional): Ability to schedule JVM restarts, shutdowns, and thread dumps at specific times or intervals.
  • Relative Memory Limits: Ability to set initial and maximum memory levels based on the total amount of system memory.
  • Consoleless binary: Ability to run the Wrapper without a console as a Windows application.

별 것은 없는데..
syslog를 이용할 수 있다는 말에 혹 마음이 간다.
또한, 톰캣을 데몬처럼 쓰게하고 restart할 때에 대한 개념을 스크립트가 아닌 daemon처럼 쓸 때 유용할 수 있겠다라는 생각이 든다..



Using Tanuki Software's Java Service Wrapper

 

Have a look at http://wrapper.tanukisoftware.org/ - the Java Service Wrapper is a very powerful service wrapper for any Java application and works fine with JBoss.

 

You can also have a look at the Windows Java Service page, which has more instructions and configuration options for the Java Service Wrapper. 

 

A basic wrapper.conf would look like this:

 


wrapper.java.command=/usr/java/bin/java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=run.jar
wrapper.java.classpath.3=/usr/java/lib/tools.jar

wrapper.java.library.path.1=../lib

wrapper.java.additional.1=-server
wrapper.java.additional.2=-Dprogram.name=run.sh

wrapper.java.initmemory=256
wrapper.java.maxmemory=256

wrapper.app.parameter.1=org.jboss.Main
wrapper.app.parameter.2=-c
wrapper.app.parameter.3=default

wrapper.console.format=PM
wrapper.console.loglevel=INFO

wrapper.logfile=wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=1m
wrapper.logfile.maxfiles=1

wrapper.syslog.loglevel=NONE


나름 상도 받구 열심히 하는 것 같다.
이런 솔루션을 만들어 봐야겠다.. 스크립트 기반보다는 정형화된 표준형식으로 사용하고 싶다라는 생각이 든다.

Awards

Posted by '김용환'
,