geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <>
Subject Re: org.apache.geronimo.system.main.Daemon and commons-cli
Date Tue, 20 Mar 2007 11:42:15 GMT
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?


> --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

View raw message