|
From: Mirko P. <m.p...@gm...> - 2007-08-18 15:37:32
|
Hi Bob, thanks for your answer, but maybe you misunterstood my problem: The problem ist not that I got class A for starting and class B for stopping the application. Class A inititializes the application, calls class B and finishes with System.exit() I read the docs and all configuration properties, but there seems to be no option for such a construction. 2007/8/17, Robert Pepersack <RPe...@md...>: > Hi Mirko, > > I don't know. It worked for me without a problem. I run the Quartz scheduler and the JBoss naming server. Here is the content of my wrapper.conf file. I hope it can help you. > > #******************************************************************** > # Wrapper Properties > #******************************************************************** > > wrapper.debug=true > > # Java Application > wrapper.java.command=../jdk1.5.0_11/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=../jdk1.5.0_11/lib/tools.jar > wrapper.java.classpath.2=../java/startup/lib/wrapper.jar > wrapper.java.classpath.3=../java/startup/lib/log4j-1.2.14.jar > wrapper.java.classpath.4=../java/startup/lib/startup.jar > > # Java Library Path (location of Wrapper.DLL or libwrapper.so) > wrapper.java.library.path.1=../bin > > # Java Additional Parameters > wrapper.java.additional.1=-Dlog4j.properties.file="../java/startup/lib/log4j.properties" > wrapper.java.additional.2=-Dserver.class.dir="../java/common/classes" > wrapper.java.additional.3=-Dserver.lib.dir="../java/common/lib" > wrapper.java.additional.4=-Ddata.source.dir="../datasource" > wrapper.java.additional.5=-Djava.naming.factory.initial="org.jnp.interfaces.NamingContextFactory" > wrapper.java.additional.6=-Djava.naming.factory.url.pkgs="org.jnp.interfaces" > #wrapper.java.additional.7=-Djava.naming.provider.url="localhost" > > # 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 > # The first application parameter is the name of the class whose main > # method is to be called when the application is launched. The class > # name is followed by the number of parameters to be passed to its main > # method. Then comes the actual parameters. > wrapper.app.parameter.1=miaJs.server.Bootstrap > wrapper.app.parameter.2=1 > wrapper.app.parameter.3=start > > # The start parameters are followed by the name of the class whose main > # method is to be called to stop the application. The stop class name > # is followed by a flag which controls whether or not the Wrapper should > # wait for all non daemon threads to complete before exiting the JVM. > # The flag is followed by the number of parameters to be passed to the > # stop class's main method. Finally comes the actual parameters. > wrapper.app.parameter.4=miaJs.server.Bootstrap > wrapper.app.parameter.5=false > wrapper.app.parameter.6=1 > wrapper.app.parameter.7=stop > > #******************************************************************** > # 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=DEBUG > > # 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=Java Job Scheduler > > #******************************************************************** > # 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=JJS > > # Display name of the service > wrapper.ntservice.displayname=JJS > > # Description of the service > wrapper.ntservice.description=Java Job Scheduler > > # 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 > # AUTO_START starts the service automatically when the system is rebooted. > # DEMAND_START requires that the service must be started manually. > wrapper.ntservice.starttype=DEMAND_START > > # Allow the service to interact with the desktop. > wrapper.ntservice.interactive=false > > > > Robert Pepersack > Senior Lead Developer > Maryland Insurance Administration > 410-468-2054 > > >>> "Mirko Pluhar" <m.p...@gm...> 08/17/2007 8:56 AM >>> > Hi Bob, > > thanks for your response. Yes, the AgentDaemon keeps running. But how > to tell the Java Service Wrapper that this is the process it should > concern about ? > > 2007/8/17, Robert Pepersack <RPe...@md...>: > > Hi Mirko, > > > > I'm fairly new at using the wrapper, too, but maybe I can help. > > > > Does your AgentDaemon class start a process that keeps running? Or, does it execute a simple method and terminate? To keep the wrapper running, I've found that you have to run something that keeps the Java VM alive. For example, I run a JNDI naming server. > > > > Bob > > > > Robert Pepersack > > Senior Lead Developer > > Maryland Insurance Administration > > 410-468-2054 > > > > >>> "Mirko Pluhar" <m.p...@gm...> 08/17/2007 1:30 AM >>> > > Hi all, > > > > I'm trying to integrate an application with Java Service Wrapper but > > I'm stuck with a problem: > > To start the application a class AgentClient ist called , which is > > only a helper to run class AgentDaemon. > > So I define class AgentClient as the initial class in java service > > wrapper configuration . When starting the wrapper it calls this class, > > AgentClient calls AgentDaemon and exit with > > success. The service wrapper recognizes that and exits also, because > > its focussed on AgentClient. > > Do you have any hints to use such a construct within java service wrapper ? > > Thanks in advance. > > > > -- > > With regards > > Mirko Pluhar > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li... > > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li... > > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > > -- > Mit freundlichen Gruessen > Mirko Pluhar > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > -- Mit freundlichen Gruessen Mirko Pluhar |