Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 66469 invoked from network); 20 Mar 2007 11:42:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2007 11:42:59 -0000 Received: (qmail 32246 invoked by uid 500); 20 Mar 2007 11:43:05 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 32206 invoked by uid 500); 20 Mar 2007 11:43:04 -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 32195 invoked by uid 99); 20 Mar 2007 11:43:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 04:43:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [211.29.132.198] (HELO mail17.syd.optusnet.com.au) (211.29.132.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 04:42:55 -0700 Received: from [192.169.0.3] (d58-106-6-146.mas2.nsw.optusnet.com.au [58.106.6.146]) (authenticated sender gianny.damour) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l2KBgGtT002138 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 20 Mar 2007 22:42:33 +1100 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Gianny Damour Subject: Re: org.apache.geronimo.system.main.Daemon and commons-cli Date: Tue, 20 Mar 2007 22:42:15 +1100 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org On 20/03/2007, at 6:12 PM, Jason Dillon wrote: > I briefly looked into adding this... but looks like a lot of the > bootstrap plumbing has changed. I'm a bit bewildered as to why we > are booting up a temporary kernel before we get to command-line > option parsing. I'm also a bit mystified as to why option parsing > is now spread over several classes. IMO the bootstrap has become > overly complicated... and probably needs some love to get it > sorted. The task of adding commons-cli to the single Daemon class > has become a wee bit more difficult due to all of this, so I'm > gonna put this off for a little bit more while I soak up all of the > recent changes and let it congeal in my head. > > In the meantime... can anyone tell me why we are booting up a > kernel before cli parsing? From what has congealed in my head so > far... this is for access to the repository for classloading of > bootstrap classes. Is there any other reason why we boot a kernel > here before cli parsing? A kernel is booted before cli parsing so that classes parsing cli arguments do not need to be defined by the system classloader. Verbose level switches must be done prior to boot a Geronimo kernel as they control the default log level and this initialization must occur prior to acquire the first log instance. The bootstrap is simple as: load a boot configuration; get a Main implementation from it (or configurations restored when the boot configuration is loaded); and invoke execute(String args[]) on it. AFAIK, all the clis use this unified approach. Why is it "a wee bit more difficult" to add commons-cli now? Thanks, Gianny > > --jason > > > On Feb 27, 2007, at 4:20 PM, Matt Hogstrom wrote: > >> Sounds good. >> >> On Feb 26, 2007, at 9:02 PM, Jason Dillon wrote: >> >>> Anyone mind if I re-write org.apache.geronimo.system.main.Daemon >>> to use commons-cli to handle option processing? >>> >>> Use of commons-cli 1.0 add ~30k to the bootstrap classpath (uses >>> commons-lang, which is already there), and will greatly simplify >>> this code, and make it a little easier/nicer to add more command- >>> line options in the future as well as providing. >>> >>> --jason >>> >> >