cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: ComposerGenerator compose method notthrowingComponentException
Date Mon, 04 Jun 2001 16:11:08 GMT
Peter Royal wrote:
> 
> At 11:45 AM 6/4/2001 -0400, you wrote:
> > > Is there a reason why the compose method of the ComposerGenerator class
> > > does not throw a ComponentException? The Composable interface specifies
> > > that a ComponentException can be throw from that method.
> >
> >no reason that I know of.   But you will notice that the compose method
> >only stores the ComponentManager--so that you will have to trap your
> >ComponentExceptions in the setup() mehtod when you actually exctract
> >your components.
> 
> I've been extracting ThreadSafe components in the compose method of my
> components since the ComponentException is already listed in the throws
> clause (custom components and Actions). Is this bad form/going against the
> grain of the design? Thanks :)
> -pete

No.  The compose() method is a perfectly valid location for looking up components.
There is no real preferred location of where you lookup the components you need.
You do need to remember to release() the components when you no longer need them.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message