You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Peter Royal <pr...@managingpartners.com> on 2002/06/06 16:58:42 UTC

Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle LifecycleHelper.java

On Thursday 06 June 2002 10:58 am, mcconnell@apache.org wrote:
>   Modified:   
> containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
> LifecycleHelper.java
>   Log:
>   corrected to handle if( Configurable ) else if( Parameterizable )

Is this correct, are Configurable and Parameterizable mutally exclusive?  
There are cases inside the phoenix kernel where an object is both 
Configurable *AND* Parameterizable. 
-pete

-- 
peter royal -> proyal@managingpartners.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle LifecycleHelper.java

Posted by Stephen McConnell <mc...@osm.net>.

Nicola Ken Barozzi wrote:

>From: "Stephen McConnell" <mc...@osm.net>
>
>
>  
>
>>Peter Royal wrote:
>>
>>    
>>
>>>On Thursday 06 June 2002 10:58 am, mcconnell@apache.org wrote:
>>>
>>>      
>>>
>>>> Modified:
>>>>containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
>>>>LifecycleHelper.java
>>>> Log:
>>>> corrected to handle if( Configurable ) else if( Parameterizable )
>>>>
>>>>        
>>>>
>>>Is this correct, are Configurable and Parameterizable mutally exclusive?
>>>
>>>      
>>>
>>Yes.
>>See the Configurable description on
>>http://jakarta.apache.org/avalon/api/index.html and the Parameterizable
>>description on http://jakarta.apache.org/avalon/api/index.html.
>>    
>>
>
>Oh. Never knew that.
>I don't like them to be mutually exclusive, there is no way to enforce this
>contract compile-time, even if the contract *is* checked at compile time
>(interface).
>
>
>  
>
>>>There are cases inside the phoenix kernel where an object is both
>>>Configurable *AND* Parameterizable.
>>>
>>>      
>>>
>>Not that I am aware of .
>>    
>>
>
>In the Cocoon lifecycle helpers, this check is not done.
>It could create incompatibilities.
>
>Are there any *strong* reasons why this is necessary?
>
>"
>The Parameterizable interface is a light-weight alternative to the
>Configurable interface. As such, the Parameterizable interface and the
>Configurable interface are not compatible.
>"
>
>seems not really a big reason.
>
>I have alway used Configurable primarly for init time configuration and
>Parametrizable for runtime stuff.
>I don' see the incompatibility.
>

I don't see any "computational" reason why a component could be both 
parameterizable and configurable - however, I do see see a logical 
inconsitency.  We are dealing with the phase in which the information 
needed to configuration a component is supplied - Parameterizable is 
appropriate in some cases, and Configuration instance is appriopriate in 
others.  I use both but only in the init time context.  For runtime 
stuff I use Contextualize.

However - if there are potential conflicts here relative to Cocoon then 
the LifecycleHelper should perhaps revert back to the earlier form (i.e. 
without checks). But we should also be consitent here in terms of CM/SM. 
Should we allow (in LifecycleHelper) a component to implement both 
Serviceable and Composable?

Something worth considering is to eliniate and logic concerning if( 
something ) else if( somethingelse ) from LifecycleHelper and place this 
inside ComponentVerifier.  This would enable a more relaxed approach at 
runtime, but the ability to do component verification at build time 
(assuming we add an ant task to undertake component verification).

Thoughts?

Steve.


>
>--
>Nicola Ken Barozzi                   nicolaken@apache.org
>            - verba volant, scripta manent -
>   (discussions get forgotten, just code remains)
>---------------------------------------------------------------------
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle LifecycleHelper.java

Posted by Nicola Ken Barozzi <ni...@apache.org>.
From: "Stephen McConnell" <mc...@osm.net>


> Peter Royal wrote:
>
> >On Thursday 06 June 2002 10:58 am, mcconnell@apache.org wrote:
> >
> >>  Modified:
> >>containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
> >>LifecycleHelper.java
> >>  Log:
> >>  corrected to handle if( Configurable ) else if( Parameterizable )
> >>
> >
> >Is this correct, are Configurable and Parameterizable mutally exclusive?
> >
>
> Yes.
> See the Configurable description on
> http://jakarta.apache.org/avalon/api/index.html and the Parameterizable
> description on http://jakarta.apache.org/avalon/api/index.html.

Oh. Never knew that.
I don't like them to be mutually exclusive, there is no way to enforce this
contract compile-time, even if the contract *is* checked at compile time
(interface).


> >There are cases inside the phoenix kernel where an object is both
> >Configurable *AND* Parameterizable.
> >
>
> Not that I am aware of .

In the Cocoon lifecycle helpers, this check is not done.
It could create incompatibilities.

Are there any *strong* reasons why this is necessary?

"
The Parameterizable interface is a light-weight alternative to the
Configurable interface. As such, the Parameterizable interface and the
Configurable interface are not compatible.
"

seems not really a big reason.

I have alway used Configurable primarly for init time configuration and
Parametrizable for runtime stuff.
I don' see the incompatibility.

--
Nicola Ken Barozzi                   nicolaken@apache.org
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containe rkit/lifecycle LifecycleHelper.java

Posted by Stephen McConnell <mc...@osm.net>.

Leo Simons wrote:

>Scared me too when I found out. I break this one all the time. While it
>is not the cleanest design, it doesn't really break any really important
>concept.
>

Ok, ok ... I've rolled back the LifecycleHelper !!!!
However, I think we should add this sort of validation logic to the 
ComponetValidator.
Cheers, Steve.


-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containe rkit/lifecycle LifecycleHelper.java

Posted by Leo Simons <le...@apache.org>.
Scared me too when I found out. I break this one all the time. While it
is not the cleanest design, it doesn't really break any really important
concept.

The main reason: it is so easy! You can do some bits of configuration
with xml files (Configurable), and some bits with runtime parameters or
java system variables (Parameterizable).

The neat solution: create a ParametersToConfiguration helper that takes
hashes (Parameters) and spits out a Configuration object. Never got
round to it.

- Leo

> >On Thursday 06 June 2002 10:58 am, mcconnell@apache.org wrote:
> >
> >>  Modified:   
> >>containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
> >>LifecycleHelper.java
> >>  Log:
> >>  corrected to handle if( Configurable ) else if( Parameterizable )
> >>
> >
> >Is this correct, are Configurable and Parameterizable mutally exclusive?  
> >
> 
> Yes.
> See the Configurable description on 
> http://jakarta.apache.org/avalon/api/index.html and the Parameterizable 
> description on http://jakarta.apache.org/avalon/api/index.html.
> 
> >
> >There are cases inside the phoenix kernel where an object is both 
> >Configurable *AND* Parameterizable. 
> >
> 
> Not that I am aware of .



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle LifecycleHelper.java

Posted by Peter Royal <pr...@apache.org>.
On Thursday 06 June 2002 01:03 pm, Stephen McConnell wrote:
> >There are cases inside the phoenix kernel where an object is both
> >Configurable *AND* Parameterizable.
>
> Not that I am aware of .

Its not committed yet ;)

The DefaultEmbeddor makes a set of parameters available to all of its child 
components, one of the parameters is the PHOENIX_HOME location. Items in 
kernel.xml can also have nested configuration elements.

DefaultEmbeddor is nice and will call configure() and parameterize(). This 
really is more of a phoenix internals issue, perhaps what is currently 
available via Parameterize should be in a Context (which, incidentally is 
where I went looking first to see if I could get PHOENIX_HOME)
-pete

-- 
peter royal -> proyal@apache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle LifecycleHelper.java

Posted by Stephen McConnell <mc...@osm.net>.

Peter Royal wrote:

>On Thursday 06 June 2002 10:58 am, mcconnell@apache.org wrote:
>
>>  Modified:   
>>containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
>>LifecycleHelper.java
>>  Log:
>>  corrected to handle if( Configurable ) else if( Parameterizable )
>>
>
>Is this correct, are Configurable and Parameterizable mutally exclusive?  
>

Yes.
See the Configurable description on 
http://jakarta.apache.org/avalon/api/index.html and the Parameterizable 
description on http://jakarta.apache.org/avalon/api/index.html.

>
>There are cases inside the phoenix kernel where an object is both 
>Configurable *AND* Parameterizable. 
>

Not that I am aware of .

Cheers, Steve.


>
>-pete
>
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/con tainerkit/lifecycle LifecycleHelper.java

Posted by Peter Donald <pe...@apache.org>.
At 10:58 AM 6/6/2002 -0400, you wrote:
>On Thursday 06 June 2002 10:58 am, mcconnell@apache.org wrote:
> >   Modified:
> > containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
> > LifecycleHelper.java
> >   Log:
> >   corrected to handle if( Configurable ) else if( Parameterizable )
>
>Is this correct, are Configurable and Parameterizable mutally exclusive?

It should be.

>There are cases inside the phoenix kernel where an object is both
>Configurable *AND* Parameterizable.

Yep - a lil hacky :)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>