geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: GBeans and Configurable Properties.
Date Wed, 02 Feb 2005 16:32:49 GMT

On Feb 2, 2005, at 8:12 AM, Mark wrote:

> A couple of questions:
> 1. If I have a GBean with an attribute "port", is this a required 
> entry in the xml?   I am thinking that I can default to port X and if 
> the user wants to reassing it then they can add the attribute 
> <attribute name="port">Y</attribute> to the XML.

What happens depends on a couple of things.
If port is not a constructor argument, then if you leave it out of the 
xml it won't get set (IIRC).
If port is a constructor argument,
if port is an Integer, then if it's missing null will be supplied.  You 
can detect this and set port to whatever you want.
if port is an int, then if its missing in the xml the default int value 
of 0 will be supplied.  Whether this makes sense a as a legal but 
non-default value will determine if you can detect it and set to your 
intended default.

In general I recommend only using constructor arguments, I usually find 
it makes the rest of the code much simpler.
> 2. Lets say the user wants to install a geronimo server and assign a 
> new port .  From what I can see, they will either have to:
>    a. Change the attribute in the XML file and then redeploy the plan.
>    b. Let the server start up on the default port, go into the 
> management console and change the value and then shutdown the server.  
> During shutdown the kernel will store the current configuration which 
> will be loaded on the restart.

That's my understanding also.  You are not the first to subtly imply 
that this may not be the ultimate in high-tech management convenience 
and sophistication.

david jencks

> Thanks
> Mark

View raw message