You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Ted Haynes <ed...@gmail.com> on 2006/03/22 20:28:16 UTC
Java Service Wrapper
I just got Geronimo running as a windows service on my XP machine using Java
Service Wrapper http://wrapper.tanukisoftware.org/ . Anyone else here use
it? Has anyone had issues with it? Here is my wrapper.conf file if anyone is
interested:
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=C:\j2sdk1.4.2_10\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.WrapperStartStopApp
# 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/geronimo-qname_1.1_spec-1.0.jar
wrapper.java.classpath.3=../lib/geronimo-common-1.0.jar
wrapper.java.classpath.4=../lib/geronimo-kernel-1.0.jar
wrapper.java.classpath.5=../lib/geronimo-system-1.0.jar
wrapper.java.classpath.6=../lib/geronimo-util-1.0.jar
wrapper.java.classpath.7=../lib/cglib-nodep-2.1_3.jar
wrapper.java.classpath.8=../lib/commons-cli-1.0.jar
wrapper.java.classpath.9=../lib/commons-logging-1.0.4.jar
wrapper.java.classpath.10=../lib/log4j-1.2.8.jar
wrapper.java.classpath.11=../lib/mx4j-3.0.1.jar
wrapper.java.classpath.12=../lib/mx4j-remote-3.0.1.jar
wrapper.java.classpath.13=../lib/endorsed/xercesImpl-2.6.2.jar
wrapper.java.classpath.14=../lib/endorsed/xmlParserAPIs-2.2.1.jar
wrapper.java.classpath.15=../lib/geronimo-deploy-tool-1.0.jar
wrapper.java.classpath.16=client.jar
wrapper.java.classpath.17=deployer.jar
wrapper.java.classpath.18=server.jar
wrapper.java.classpath.19=shutdown.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib
# Java Additional Parameters
wrapper.java.additional.1=-Dorg.apache.geronimo.base.dir=C:\geronimo-1.0
wrapper.java.additional.2=-Djava.io.tmpdir=C:\geronimo-1.0\var\temp
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.apache.geronimo.system.main.Daemon
wrapper.app.parameter.2=0
wrapper.app.parameter.3=org.apache.geronimo.deployment.cli.StopServer
wrapper.app.parameter.4=false
wrapper.app.parameter.5=4
wrapper.app.parameter.6=--user
wrapper.app.parameter.7=system
wrapper.app.parameter.8=--password
wrapper.app.parameter.9=manager
#********************************************************************
# 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
# 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=0
# 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
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=Geronimo J2EE Server
#********************************************************************
# 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.ntservice.name=Geronimo
# Display name of the service
wrapper.ntservice.displayname=Geronimo J2EE Server
# Description of the service
wrapper.ntservice.description=Geronimo J2EE 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
Re: Java Service Wrapper
Posted by Aaron Mulder <am...@alumni.princeton.edu>.
This is cool! Like John said, it would be great if we can generate it
during the build, so we plug in all the right JARs and version
numbers. I wonder if we could make this a side effect of the assembly
plugin?
Thanks,
Aaron
On 3/22/06, Ted Haynes <ed...@gmail.com> wrote:
> I just got Geronimo running as a windows service on my XP machine using Java
> Service Wrapper http://wrapper.tanukisoftware.org/ . Anyone
> else here use it? Has anyone had issues with it? Here is my wrapper.conf
> file if anyone is interested:
>
> #********************************************************************
> # Wrapper Properties
> #********************************************************************
> # Java Application
> wrapper.java.command=C:\j2sdk1.4.2_10\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.WrapperStartStopApp
>
> # 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/geronimo-qname_1.1_spec-1.0.jar
> wrapper.java.classpath.3=../lib/geronimo-common-1.0.jar
> wrapper.java.classpath.4=../lib/geronimo-kernel-1.0.jar
> wrapper.java.classpath.5=../lib/geronimo-system-1.0.jar
> wrapper.java.classpath.6=../lib/geronimo-util-1.0.jar
> wrapper.java.classpath.7=../lib/cglib-nodep-2.1_3.jar
> wrapper.java.classpath.8=../lib/commons-cli-1.0.jar
> wrapper.java.classpath.9=../lib/commons-logging-1.0.4.jar
> wrapper.java.classpath.10=../lib/log4j-1.2.8.jar
> wrapper.java.classpath.11=../lib/mx4j-3.0.1.jar
> wrapper.java.classpath.12=../lib/mx4j-remote-3.0.1.jar
> wrapper.java.classpath.13=../lib/endorsed/xercesImpl-2.6.2.jar
> wrapper.java.classpath.14=../lib/endorsed/xmlParserAPIs-2.2.1.jar
> wrapper.java.classpath.15=../lib/geronimo-deploy-tool-1.0.jar
> wrapper.java.classpath.16=client.jar
> wrapper.java.classpath.17=deployer.jar
> wrapper.java.classpath.18=server.jar
> wrapper.java.classpath.19=shutdown.jar
>
> # Java Library Path (location of Wrapper.DLL or libwrapper.so)
> wrapper.java.library.path.1=../lib
>
> # Java Additional Parameters
> wrapper.java.additional.1=-Dorg.apache.geronimo.base.dir=C:\geronimo-1.0
> wrapper.java.additional.2=-Djava.io.tmpdir=C:\geronimo-1.0\var\temp
>
> # Initial Java Heap Size (in MB)
> #wrapper.java.initmemory=3
>
> # Maximum Java Heap Size (in MB)
> #wrapper.java.maxmemory=64
>
> # Application parameters. Add parameters as needed starting from 1
> wrapper.app.parameter.1=org.apache.geronimo.system.main.Daemon
> wrapper.app.parameter.2=0
> wrapper.app.parameter.3=org.apache.geronimo.deployment.cli.StopServer
> wrapper.app.parameter.4=false
> wrapper.app.parameter.5=4
> wrapper.app.parameter.6=--user
> wrapper.app.parameter.7=system
> wrapper.app.parameter.8=--password
> wrapper.app.parameter.9=manager
>
> #********************************************************************
> # 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
>
> # 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=0
>
> # 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
>
> # Log Level for sys/event log output. (See docs for log levels)
> wrapper.syslog.loglevel=NONE
>
> #********************************************************************
> # Wrapper Windows Properties
> #********************************************************************
> # Title to use when running as a console
> wrapper.console.title=Geronimo J2EE Server
>
> #********************************************************************
> # 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.ntservice.name=Geronimo
>
> # Display name of the service
> wrapper.ntservice.displayname=Geronimo J2EE Server
>
> # Description of the service
> wrapper.ntservice.description=Geronimo J2EE 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
>
>
>
Re: Java Service Wrapper
Posted by Ted Haynes <ed...@gmail.com>.
As pointed out in the thread, I changed the classpath. I also removed the
deployer.jar from the class path because I was getting duplicate class
loader instance.
Here is my new one which seems to be working fine.
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=C:\j2sdk1.4.2_10\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.WrapperStartStopApp
# 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/cglib-nodep-2.1_3.jar
wrapper.java.classpath.3=../lib/commons-cli-1.0.jar
wrapper.java.classpath.4=../lib/commons-logging-1.0.4.jar
wrapper.java.classpath.5=../lib/geronimo-common-1.0.jar
wrapper.java.classpath.6=../lib/geronimo-deploy-jsr88-1.0.jar
wrapper.java.classpath.7=../lib/geronimo-deploy-tool-1.0.jar
wrapper.java.classpath.8=../lib/geronimo-deployment-1.0.jar
wrapper.java.classpath.9=../lib/geronimo-j2ee-deployment_1.1_spec-1.0.jar
wrapper.java.classpath.10=../lib/geronimo-kernel-1.0.jar
wrapper.java.classpath.11=../lib/geronimo-qname_1.1_spec-1.0.jar
wrapper.java.classpath.12=../lib/geronimo-system-1.0.jar
wrapper.java.classpath.13=../lib/geronimo-util-1.0.jar
wrapper.java.classpath.14=../lib/log4j-1.2.8.jar
wrapper.java.classpath.15=../lib/mx4j-3.0.1.jar
wrapper.java.classpath.16=../lib/mx4j-remote-3.0.1.jar
#wrapper.java.classpath.17=../lib/endorsed/xercesImpl-2.6.2.jar
#wrapper.java.classpath.18=../lib/endorsed/xmlParserAPIs-2.2.1.jar
wrapper.java.classpath.17=server.jar
wrapper.java.classpath.18=shutdown.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib
# Java Additional Parameters
wrapper.java.additional.1=-Dorg.apache.geronimo.base.dir=C:\geronimo-1.0
wrapper.java.additional.2=-Djava.io.tmpdir=C:\geronimo-1.0\var\temp
wrapper.java.additional.3=-Djava.endorsed.dirs="../lib/endorsed"
wrapper.java.additional.4=-Djava.extension.dirs="../lib/extension"
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.apache.geronimo.system.main.Daemon
wrapper.app.parameter.2=0
wrapper.app.parameter.3=org.apache.geronimo.deployment.cli.StopServer
wrapper.app.parameter.4=false
wrapper.app.parameter.5=4
wrapper.app.parameter.6=--user
wrapper.app.parameter.7=system
wrapper.app.parameter.8=--password
wrapper.app.parameter.9=manager
#********************************************************************
# 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=../var/log/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
# 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=0
# 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
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=Geronimo J2EE Server
#********************************************************************
# 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.ntservice.name=Geronimo
# Display name of the service
wrapper.ntservice.displayname=Geronimo J2EE Server
# Description of the service
wrapper.ntservice.description=Geronimo J2EE 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
Re: Java Service Wrapper
Posted by John Sisson <jr...@gmail.com>.
Note that you will have to review the jars in the classpath for each
Geronimo release as version numbers will change and jars may be
added/removed.
I hope that in a future release we can have this file generated as part
of the Geronimo build process to minimise the amount of work users must
do. See http://issues.apache.org/jira/browse/GERONIMO-693
Note that you shouldn't have the jars in the lib/endorsed directory on
the classpath. You need to pass -Djava.endorsed.dirs="../lib/endorsed"
to the JVM.
Regards,
John
Ted Haynes wrote:
> I just got Geronimo running as a windows service on my XP machine
> using Java Service Wrapper http://wrapper.tanukisoftware.org/ . Anyone
> else here use it? Has anyone had issues with it? Here is my
> wrapper.conf file if anyone is interested:
>
> #********************************************************************
> # Wrapper Properties
> #********************************************************************
> # Java Application
> wrapper.java.command=C:\j2sdk1.4.2_10\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.WrapperStartStopApp
>
> # 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/geronimo-qname_1.1_spec-1.0.jar
> wrapper.java.classpath.3=../lib/geronimo-common-1.0.jar
> wrapper.java.classpath.4=../lib/geronimo-kernel-1.0.jar
> wrapper.java.classpath.5=../lib/geronimo-system-1.0.jar
> wrapper.java.classpath.6=../lib/geronimo-util-1.0.jar
> wrapper.java.classpath.7=../lib/cglib-nodep-2.1_3.jar
> wrapper.java.classpath.8=../lib/commons-cli-1.0.jar
> wrapper.java.classpath.9=../lib/commons-logging-1.0.4.jar
> wrapper.java.classpath.10=../lib/log4j-1.2.8.jar
> wrapper.java.classpath.11=../lib/mx4j-3.0.1.jar
> wrapper.java.classpath.12=../lib/mx4j-remote-3.0.1.jar
> wrapper.java.classpath.13=../lib/endorsed/xercesImpl-2.6.2.jar
> wrapper.java.classpath.14=../lib/endorsed/xmlParserAPIs-2.2.1.jar
> wrapper.java.classpath.15=../lib/geronimo-deploy-tool-1.0.jar
> wrapper.java.classpath.16=client.jar
> wrapper.java.classpath.17=deployer.jar
> wrapper.java.classpath.18=server.jar
> wrapper.java.classpath.19=shutdown.jar
>
> # Java Library Path (location of Wrapper.DLL or libwrapper.so)
> wrapper.java.library.path.1=../lib
>
> # Java Additional Parameters
> wrapper.java.additional.1=-Dorg.apache.geronimo.base.dir=C:\geronimo-1.0
> wrapper.java.additional.2=-Djava.io.tmpdir=C:\geronimo-1.0\var\temp
>
> # Initial Java Heap Size (in MB)
> #wrapper.java.initmemory=3
>
> # Maximum Java Heap Size (in MB)
> #wrapper.java.maxmemory=64
>
> # Application parameters. Add parameters as needed starting from 1
> wrapper.app.parameter.1=org.apache.geronimo.system.main.Daemon
> wrapper.app.parameter.2=0
> wrapper.app.parameter.3=org.apache.geronimo.deployment.cli.StopServer
> wrapper.app.parameter.4=false
> wrapper.app.parameter.5=4
> wrapper.app.parameter.6=--user
> wrapper.app.parameter.7=system
> wrapper.app.parameter.8=--password
> wrapper.app.parameter.9=manager
>
> #********************************************************************
> # 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
>
> # 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=0
>
> # 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
>
> # Log Level for sys/event log output. (See docs for log levels)
> wrapper.syslog.loglevel=NONE
>
> #********************************************************************
> # Wrapper Windows Properties
> #********************************************************************
> # Title to use when running as a console
> wrapper.console.title=Geronimo J2EE Server
>
> #********************************************************************
> # 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.ntservice.name=Geronimo
>
> # Display name of the service
> wrapper.ntservice.displayname=Geronimo J2EE Server
>
> # Description of the service
> wrapper.ntservice.description=Geronimo J2EE 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
>
>