Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 99476 invoked from network); 4 Dec 2008 18:15:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2008 18:15:09 -0000 Received: (qmail 53616 invoked by uid 500); 4 Dec 2008 18:15:20 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 53570 invoked by uid 500); 4 Dec 2008 18:15:20 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 53559 invoked by uid 99); 4 Dec 2008 18:15:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 10:15:20 -0800 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.56] (HELO smtp101.prem.mail.sp1.yahoo.com) (98.136.44.56) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 04 Dec 2008 18:13:50 +0000 Received: (qmail 50619 invoked from network); 4 Dec 2008 17:47:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Mime-Version:Subject:Date:References:X-Mailer; b=c9E33ijPUTxjkJzpGBswTdHtBbitlBXTXpTJQ4CljeLc8l3LWrFQhmYQZSxoBMnr6LPnnaWcMa8ZFu0OFJKTh7499VLxfneyH2tr/uqFBjvmAORKCS7khEqwgSyR0G4qy+DiiPaqKM6xHA7yHL5plle+cNa7vMR3Lzn6A5yq564= ; Received: from unknown (HELO ?10.11.55.10?) (david_jencks@63.105.20.225 with plain) by smtp101.prem.mail.sp1.yahoo.com with SMTP; 4 Dec 2008 17:47:54 -0000 X-YMail-OSG: 9VI3f1EVM1nH2_DAUpRqHdRXiT1tuQugryIFAHSgVtTPPGRhLmoFd_9wc588Hbbfj7R9s7ZoxOkY.5IotHhEVUlEH3ktaZg0Pxomkd9cVPjTwZZZgWre96Lm7RYTse1x.bXI6UdTmjRN.kEj90unKZzRHjaMTKbMk3b_c2wxvgLTwxbF95R0waMX1SzeEL5g2jGaaS4nxkgqwTsKE7ZYuX1SDsAoRRukXkb1ToU- X-Yahoo-Newman-Property: ymail-3 Message-Id: <48D2603C-DC30-4173-A5AF-FA91766D09FF@yahoo.com> From: David Jencks To: dev@geronimo.apache.org In-Reply-To: <0622F476-1F0F-4A9C-99B3-E89DDDC22EF1@planet57.com> Content-Type: multipart/alternative; boundary=Apple-Mail-35-997569593 Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: [discussion] Using Apache Commons Deamon to run Geronimo as a Windows service Date: Thu, 4 Dec 2008 09:47:52 -0800 References: <5e7fd1eb0812040154j1b4160fdj1dd132831f4574de@mail.gmail.com> <0622F476-1F0F-4A9C-99B3-E89DDDC22EF1@planet57.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-35-997569593 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit +1 david jencks On Dec 4, 2008, at 4:20 AM, Jason Dillon wrote: > Why not use GShell here? ie. just put lib/boot/gshell-bootstrap.jar > on your classpath? > > --jason > > > On Dec 4, 2008, at 4:54 PM, Jack Cai wrote: > >> I have been working on enabling Geronimo to run as a Windows >> service using Apache Commons Deamon procrun utility. I have been >> making good progress. Now I have some problems and would like to >> hear your opinions. >> >> 1. I have gone through all the open JIRAs of that project and are >> fixing some of them. I have also reported and fixed several found >> by myself, and a few improvements too. But nobody is helping to >> commit my patches. Will it be OK that Geronimo just use the binary >> code built by me without maintaining the latest code (I mean, which >> includes my patches)? Tomcat only include procrun's binary today >> (as tomcat6.exe and tomcat6w.exe) which is probably built with the >> latest code from Apache Commons. >> >> 2. Currently procrun need the starter class and stopper class to be >> on the same classpath. Unfortunately our server.jar and >> shutdown.jar contains different config.ser, which screws things up. >> So I tried various ways to work around this problem before I change >> procrun's design - >> >> A. write a wrapper, which use a URLClassloader to load different >> jar for startup and shutdown. To do so, I had to first remove the >> jpa agent, as the system classloader (parent of my URLClassloader) >> will load the config.ser in jpa.jar. After that Geronimo starts to >> boot, until the below exception occurs: >> >> 17:43:19,421 WARN [1/car,j2eeType=GBean,name=JMXService] Failure >> in JMXConnector service:jmx:rmi://0.0.0.0:9999/jndi/rmi:// >> 0.0.0.0:1099/JMXConnector >> 17:43:19,421 ERROR [GBeanInstanceState] Error while starting; GBean >> is now in the FAILED state: >> abstractName="org.apache.geronimo.framework/j2ee-security/2.1.1/car? >> ServiceModule=org.apache.geronimo.framework/j2ee-security/2.1.1/ >> car,j2eeType=GBean,name=JMXService" >> java.lang.NoClassDefFoundError: >> org.apache.geronimo.kernel.rmi.RMIClassLoaderSpiImpl >> at >> java >> .rmi.server.RMIClassLoader.initializeProvider(RMIClassLoader.java: >> 680) >> >> B. so I rewrite the wrapper and use (dirty) reflections to add jar >> file to system classloader's classpath based on the action (start/ >> stop). Sadly, the jpa.jar again gets into the way. Obviously the >> jpa.jar is searched before the newly added jar. If I remove the jpa >> agent, then things go smoothly. I could do more hack with the >> classloader to work around the jpa.jar. But this hacking does not >> sound right to me in the first place. >> >> C. Use procrun's jvm mode (instead of java command line), and only >> put server.jar in classpath. Write a simple class which calls >> "System.exit(0)" for stopping Geronimo. This works, but only that >> procrun does not clean up properly. >> >> Are there other better options? Appreciate your help! >> >> -Jack Cai >> > --Apple-Mail-35-997569593 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable +1
david = jencks

On Dec 4, 2008, at 4:20 AM, Jason Dillon = wrote:

Why not use GShell here? =  ie. just put lib/boot/gshell-bootstrap.jar on your = classpath?

--jason


On Dec 4, 2008, at 4:54 PM, Jack Cai wrote:

I have = been working on enabling Geronimo to run as a Windows service using = Apache Commons Deamon procrun utility. I have been making good progress. = Now I have some problems and would like to hear your opinions.

1. = I have gone through all the open JIRAs of that project and are fixing = some of them. I have also reported and fixed several found by myself, = and a few improvements too. But nobody is helping to commit my patches. = Will it be OK that Geronimo just use the binary code built by me without = maintaining the latest code (I mean, which includes my patches)? Tomcat = only include procrun's binary today (as tomcat6.exe and tomcat6w.exe) = which is probably built with the latest code from Apache Commons.
=
2. Currently procrun need the starter class and stopper class to be = on the same classpath. Unfortunately our server.jar and shutdown.jar = contains different config.ser, which screws things up. So I tried = various ways to work around this problem before I change procrun's = design -

 A. write a wrapper, which use a URLClassloader to = load different jar for startup and shutdown. To do so, I had to first = remove the jpa agent, as the system classloader (parent of my = URLClassloader) will load the config.ser in jpa.jar. After that Geronimo = starts to boot, until the below exception occurs:

17:43:19,421 = WARN  [1/car,j2eeType=3DGBean,name=3DJMXService] Failure in = JMXConnector service:jmx:rmi://0.0.0.0:= 9999/jndi/rmi://0.0.0.0:1099/JMXConnector
17:43:19,421 ERROR = [GBeanInstanceState] Error while starting; GBean is now in the FAILED = state: = abstractName=3D"org.apache.geronimo.framework/j2ee-security/2.1.1/car?Serv= iceModule=3Dorg.apache.geronimo.framework/j2ee-security/2.1.1/car,j2eeType= =3DGBean,name=3DJMXService"
java.lang.NoClassDefFoundError: = org.apache.geronimo.kernel.rmi.RMIClassLoaderSpiImpl
   = at = java.rmi.server.RMIClassLoader.initializeProvider(RMIClassLoader.java:680)=

 B. so I rewrite the wrapper and use (dirty) reflections to = add jar file to system classloader's classpath based on the action = (start/stop). Sadly, the jpa.jar again gets into the way. Obviously the = jpa.jar is searched before the newly added jar. If I remove the jpa = agent, then things go smoothly. I could do more hack with the = classloader to work around the jpa.jar. But this hacking does not sound = right to me in the first place.

 C. Use procrun's jvm mode = (instead of java command line), and only put server.jar in classpath. = Write a simple class which calls "System.exit(0)" for stopping Geronimo. = This works, but only that procrun does not clean up properly.
=
Are there other better options? Appreciate your help!

-Jack = Cai



= --Apple-Mail-35-997569593--