You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/06/04 18:11:08 UTC

Re: ComposerGenerator compose method notthrowingComponentException

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