0

有没有人设法使用 Java Service Wrapper 将 JBOSS 7 域设置作为服务运行?非常感谢您对我们的帮助

4

1 回答 1

1

是的,请试试这个:

#encoding=UTF-8

set.JBOSS_HOME=E:\jboss-as-7.1.0.Final       (<---insert your JBOSS-HOME path here, if it's not already globally defined)
set.JAVA_HOME=C:\Program Files\Java\jdk1.6.0_26 (<---insert your JAVA-HOME path here,  if it's not already globally defined)

#  Specify a specific java binary:
wrapper.java.command=%JAVA_HOME%/bin/java

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

#classpath (all classes will be dynamically loaded, so except the Wrapper's library and JBoss' initialization class no other libraries needed. 
wrapper.java.classpath.1=%JBOSS_HOME%/jboss-modules.jar
wrapper.java.classpath.2=%JBOSS_HOME%/lib/wrapper.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=%JBOSS_HOME%/lib

# Java Bits.  On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE

# Java Additional Parameters
wrapper.java.additional.1=-XX:+TieredCompilation
wrapper.java.additional.2=-Dorg.jboss.resolver.warning=true
wrapper.java.additional.3=-Dsun.rmi.dgc.client.gcInterval=3600000
wrapper.java.additional.4=-Dsun.rmi.dgc.server.gcInterval=3600000
wrapper.java.additional.5=-Djboss.modules.system.pkgs=org.jboss.byteman
wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=false
wrapper.java.additional.7=-Dlogging.configuration=file:"%JBOSS_HOME%/domain/configuration/logging.properties"
wrapper.java.additional.7.stripquotes=TRUE
wrapper.java.additional.8=-XX:MaxPermSize=256M
wrapper.java.additional.9=-Djava.net.preferIPv4Stack=true
wrapper.java.additional.10=-Djboss.domain.default.config=domain.xml
wrapper.java.additional.11=-Djboss.host.default.config=host.xml
wrapper.java.additional.12=-server
wrapper.java.additional.13=-Dorg.jboss.boot.log.file="%JBOSS_HOME%/domain/log/process-controller.log"
wrapper.java.additional.13.stripquotes=TRUE

# Initial Java Heap Size (in MB)
wrapper.java.initmemory=64

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=512

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.jboss.modules.Main
wrapper.app.parameter.2=-mp
wrapper.app.parameter.3="%JBOSS_HOME%/modules"
wrapper.app.parameter.3.stripquotes=TRUE
wrapper.app.parameter.4=org.jboss.as.process-controller
wrapper.app.parameter.5=-jboss-home
wrapper.app.parameter.6="%JBOSS_HOME%"
wrapper.app.parameter.3.stripquotes=TRUE
wrapper.app.parameter.7=-jvm
wrapper.app.parameter.8="%JAVA_HOME%/bin/java"
wrapper.app.parameter.8.stripquotes=TRUE
wrapper.app.parameter.9=--
wrapper.app.parameter.10=-Dorg.jboss.boot.log.file="%JBOSS_HOME%/domain/log/host-controller.log"
wrapper.app.parameter.10.stripquotes=TRUE
wrapper.app.parameter.11=-Dlogging.configuration=file:"%JBOSS_HOME%/domain/configuration/logging.properties"
wrapper.app.parameter.11.stripquotes=TRUE
wrapper.app.parameter.12=-Xms64M
wrapper.app.parameter.13=-Xmx512M
wrapper.app.parameter.14=-XX:MaxPermSize=256M
wrapper.app.parameter.15=-Dsun.rmi.dgc.client.gcInterval=3600000
wrapper.app.parameter.16=-Dsun.rmi.dgc.server.gcInterval=3600000
wrapper.app.parameter.17=-Djava.net.preferIPv4Stack=true
wrapper.app.parameter.18=-Dorg.jboss.resolver.warning=true
wrapper.app.parameter.19=-Djboss.modules.system.pkgs=org.jboss.byteman
wrapper.app.parameter.20=-Djboss.domain.default.config=domain.xml
wrapper.app.parameter.21=-Djboss.host.default.config=host.xml
wrapper.app.parameter.22=-server
wrapper.app.parameter.23=--
wrapper.app.parameter.24=-default-jvm
wrapper.app.parameter.25="%JAVA_HOME%/bin/java"
wrapper.app.parameter.25.stripquotes=TRUE


#********************************************************************
# 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/wrapper.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

#********************************************************************
# Wrapper General Properties
#********************************************************************
# Allow for the use of non-contiguous numbered properties
wrapper.ignore_sequence_gaps=TRUE

# Do not start if the pid file already exists.
wrapper.pidfile.strict=TRUE

# Title to use when running as a console
wrapper.console.title=Test Wrapper Sample Application

#********************************************************************
# Wrapper Windows NT/2000/XP 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.name=jboss7domain

# Display name of the service
wrapper.displayname=JBoss AS 7.1.0 Domain

# Description of the service
wrapper.description=JBoss AS 7.1.0 Domain

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START, DELAY_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

请让我知道这对您来说是如何工作的,如果您在使用 Java Service Wrapper 时有任何其他问题,请告诉我。

干杯,

于 2012-06-05T06:47:58.813 回答