You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Mark <de...@hotmail.com> on 2005/02/02 17:12:36 UTC
GBeans and Configurable Properties.
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.
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.
Thanks
Mark
Re: GBeans and Configurable Properties.
Posted by Jeremy Boynes <jb...@apache.org>.
sissonj@insession.com wrote:
> some related questions...
>
> Currently the XML plans are not placed in the
> geronimo-assembly-1.0-SNAPSHOT.jar, they are placed in
> geronimo\modules\assembly\target\plan, which would only be available to
> those who build from the source code.
>
> Q1. Should we be relocating the plans so they are shipped as part of the
> geronimo-assembly-1.0-SNAPSHOT.jar so that users of a binary release can
> modify things such as port numbers? This would be important if the
> default port is already in use.
>
We used to at some point and I think this is a good idea; others don't.
> Q2. Are there any plans to be able to convert serialized configurations
> (in the config-store) back into XML plans so:
>
> * one can see what their current system current configuration is,
> without having to navigate lots of screens in a management console and use
> text/XML tools to compare with earlier versions of plans or plans being
> used on another system (e.g. compare the differences between their test
> and production environments). Change/Configuration management staff at
> large organisations would probably like this ability.
>
> * enable easier support of Geronimo or applications running on Geronimo,
> as users can send an XML plan to support staff that is easily readable.
>
> * users could export plans to XML, modify them and then use them on
> another system
>
The serialized configurations contain attributes that are not easily
represented as XML - for example, the EJB deployer builds GBeans
representing the runtime configuration of the EJB container, which
includes things like pre-built JNDI contexts, interceptor stacks,
pre-compiled queries, ...
That being said, we need to provide diagnostic tools that allow people
to examine the configuration of a stopped server. One thought is that
certain attributes are tagged "configurable" and that they contain
values that are human-readable - a bit like open MBeans. These are the
ones that would normally be accessible through the console. It would
also be useful to have a command line property editor that allowed
things like the port number to be changed without redeploying the
original plan.
One feature that is missing from the deployer (IIRC) is a Configuration
import/export capability that would allow binary configs to be moved
between servers.
One concept that is key here is that Configurations are binary artifacts
that, just like the output from a compiler, can be managed as such.
The packaging as JAR file allows them to be signed so that
Change/Configuration management staff can absolutely track the
provenance of a packaged Configuration from where it was built to
wherever it is installed.
This is also why config id's are URIs - so that plans can be published
and uniquely identified in much the same way as XML-Schema definitions.
At this time, we do not consider the plans in Geronimo final and as such
have not introduced any versioning for them. When we actually release
final versions then we will specify version numbers for the plans used
to build the release. The same mechanism is available to users for their
plans and I would expect a user to whom change control was important to
make use of these mechanisms.
--
Jeremy
Re: GBeans and Configurable Properties.
Posted by si...@insession.com.
some related questions...
Currently the XML plans are not placed in the
geronimo-assembly-1.0-SNAPSHOT.jar, they are placed in
geronimo\modules\assembly\target\plan, which would only be available to
those who build from the source code.
Q1. Should we be relocating the plans so they are shipped as part of the
geronimo-assembly-1.0-SNAPSHOT.jar so that users of a binary release can
modify things such as port numbers? This would be important if the
default port is already in use.
Q2. Are there any plans to be able to convert serialized configurations
(in the config-store) back into XML plans so:
* one can see what their current system current configuration is,
without having to navigate lots of screens in a management console and use
text/XML tools to compare with earlier versions of plans or plans being
used on another system (e.g. compare the differences between their test
and production environments). Change/Configuration management staff at
large organisations would probably like this ability.
* enable easier support of Geronimo or applications running on Geronimo,
as users can send an XML plan to support staff that is easily readable.
* users could export plans to XML, modify them and then use them on
another system
Thanks,
John
David Jencks <dj...@gluecode.com> wrote on 03/02/2005 03:32:49 AM:
>
> 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.
>
> thanks
> david jencks
>
> >
> > Thanks
> > Mark
> >
>
Re: GBeans and Configurable Properties.
Posted by David Jencks <dj...@gluecode.com>.
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.
thanks
david jencks
>
> Thanks
> Mark
>