|
From: Robert P. <RPe...@md...> - 2007-08-21 12:12:29
|
Hi Mirko, I'm glad you found a solution. Sorry it's taken me so long to get back to = you. I've been sick. Bob Robert Pepersack Senior Lead Developer Maryland Insurance Administration 410-468-2054 >>> "Mirko Pluhar" <m.p...@gm...> 08/18/2007 3:14 PM >>> I found a workaround for my problem. So not any investigation necessary = ... 2007/8/18, Mirko Pluhar <m.p...@gm...>: > 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=3Dtrue > > > > # Java Application > > wrapper.java.command=3D../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=3Dorg.tanukisoftware.wrapper.WrapperStartStopApp= > > > > # Java Classpath (include wrapper.jar) Add class path elements as > > # needed starting from 1 > > wrapper.java.classpath.1=3D../jdk1.5.0_11/lib/tools.jar > > wrapper.java.classpath.2=3D../java/startup/lib/wrapper.jar > > wrapper.java.classpath.3=3D../java/startup/lib/log4j-1.2.14.jar > > wrapper.java.classpath.4=3D../java/startup/lib/startup.jar > > > > # Java Library Path (location of Wrapper.DLL or libwrapper.so) > > wrapper.java.library.path.1=3D../bin > > > > # Java Additional Parameters > > wrapper.java.additional.1=3D-Dlog4j.properties.file=3D"../java/startup/= lib/log4j.properties" > > wrapper.java.additional.2=3D-Dserver.class.dir=3D"../java/common/classe= s" > > wrapper.java.additional.3=3D-Dserver.lib.dir=3D"../java/common/lib" > > wrapper.java.additional.4=3D-Ddata.source.dir=3D"../datasource" > > wrapper.java.additional.5=3D-Djava.naming.factory.initial=3D"org.jnp.in= terfaces.NamingContextFactory" > > wrapper.java.additional.6=3D-Djava.naming.factory.url.pkgs=3D"org.jnp.i= nterfaces" > > #wrapper.java.additional.7=3D-Djava.naming.provider.url=3D"localhost" > > > > # Initial Java Heap Size (in MB) > > #wrapper.java.initmemory=3D3 > > > > # Maximum Java Heap Size (in MB) > > #wrapper.java.maxmemory=3D64 > > > > # 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=3DmiaJs.server.Bootstrap > > wrapper.app.parameter.2=3D1 > > wrapper.app.parameter.3=3Dstart > > > > # 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=3DmiaJs.server.Bootstrap > > wrapper.app.parameter.5=3Dfalse > > wrapper.app.parameter.6=3D1 > > wrapper.app.parameter.7=3Dstop > > > > #******************************************************************** > > # Wrapper Logging Properties > > #******************************************************************** > > # Format of output for the console. (See docs for formats) > > wrapper.console.format=3DPM > > > > # Log Level for console output. (See docs for log levels) > > wrapper.console.loglevel=3DDEBUG > > > > # Log file to use for wrapper output logging. > > wrapper.logfile=3D../logs/wrapper.log > > > > # Format of output for the log file. (See docs for formats) > > wrapper.logfile.format=3DLPTM > > > > # Log Level for log file output. (See docs for log levels) > > wrapper.logfile.loglevel=3DINFO > > > > # 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 =3D 10 megabytes. > > wrapper.logfile.maxsize=3D0 > > > > # 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=3D0 > > > > # Log Level for sys/event log output. See docs for log levels. > > wrapper.syslog.loglevel=3DNONE > > > > #******************************************************************** > > # Wrapper Windows Properties > > #******************************************************************** > > # Title to use when running as a console > > wrapper.console.title=3DJava 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=3DJJS > > > > # Display name of the service > > wrapper.ntservice.displayname=3DJJS > > > > # Description of the service > > wrapper.ntservice.description=3DJava Job Scheduler > > > > # Service dependencies. Add dependencies as needed starting from 1 > > wrapper.ntservice.dependency.1=3D > > > > # 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=3DDEMAND_START > > > > # Allow the service to interact with the desktop. > > wrapper.ntservice.interactive=3Dfalse > > > > > > > > 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/=20 > > > _______________________________________________ > > > Wrapper-user mailing list > > > Wra...@li...=20 > > > https://lists.sourceforge.net/lists/listinfo/wrapper-user=20 > > > > > > > > > ---------------------------------------------------------------------= ---- > > > 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/=20 > > > _______________________________________________ > > > Wrapper-user mailing list > > > Wra...@li...=20 > > > https://lists.sourceforge.net/lists/listinfo/wrapper-user=20 > > > > > > > > > -- > > 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/=20 > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/wrapper-user=20 > > > > -----------------------------------------------------------------------= -- > > 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/=20 > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/wrapper-user=20 > > > > > -- > Mit freundlichen Gruessen > Mirko Pluhar > --=20 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/=20 _______________________________________________ Wrapper-user mailing list Wra...@li...=20 https://lists.sourceforge.net/lists/listinfo/wrapper-user |