Skip to end of metadata
Go to start of metadata

Steps to setup the Java Service Wrapper for LAMS (Linux)

The community Tanuki software wrapper is only for 32 bits operating system. We recommend you use JAWSW instead

http://wrapper.tanukisoftware.org/doc/english/introduction.html

  1. Download by going clicking above link, and selecting 'Bianries' under the 'Download' section in the frame on the left
  2. Unpack
  3. Copy bin/wrapper to $JBOSS_HOME/bin/
  4. Copy src/bin/sh.script.in to $JBOSS_HOME/bin/lams2
  5. Copy lib/libwrapper.so $JBOSS_HOME/lib/
  6. Copy lib/wrapper.jar $JBOSS_HOME/lib/
  7. Create directory $JBOSS_HOME/conf/
  8. Copy src/conf/wrapper.conf.in $JBOSS_HOME/conf/wrapper.conf
  9. Create directory $JBOSS_HOME/logs/
  10. Edit $JBOSS_HOME/bin/lams2
    APP_NAME="lams2"
    APP_LONG_NAME="LAMS"
    
  11. Edit $JBOSS_HOME/bin/run.sh
    From:
    "$JAVA" $JAVA_OPTS \
          -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
          -classpath "$JBOSS_CLASSPATH" \
          org.jboss.Main "$@"
       STATUS=$?
    
    To:
    echo "$JAVA $JAVA_OPTS \
          -Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS \
          -classpath $JBOSS_CLASSPATH \
          org.jboss.Main $@"
       STATUS=$?
    
  12. Edit $JBOSS_HOME/conf/wrapper.conf
    # Java Application
    wrapper.java.command=$JAVA_HOME/bin/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=../bin/run.jar
    wrapper.java.classpath.3=$JAVA_HOME/lib/tools.jar
    
    # Java Library Path (location of Wrapper.DLL or libwrapper.so)
    wrapper.java.library.path.1=../lib
    
    # Java Additional Parameters
    #wrapper.java.additional.1=
    wrapper.java.additional.1=-Dprogram.name=run.sh
    wrapper.java.additional.2=-XX:MaxPermSize=256m
    
    # Initial Java Heap Size (in MB)
    wrapper.java.initmemory=256m
    
    # Maximum Java Heap Size (in MB)
    wrapper.java.maxmemory=512m
    
    # Application parameters.  Add parameters as needed starting from 1
    wrapper.app.parameter.1=org.jboss.Main
    

    The default log settings in wrapper.conf set console output to a wrapper.log that has no limit. This captures all of LAMS' console output, and can potentially get very large. Since LAMS' console output is captured in jboss logs as well as the console, you may wish to disable the wrapper's log altogether, or at least configure a maximum file size.

    To disable it, set wrapper.logfile.loglevel=NONE (see the man page for this setting)

    # 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=10m
    
    # 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=10
    
  13. Link /etc/init.d/lams2 to $JBOSS_HOME/bin/lams2
  • No labels