You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Peter Royal <pr...@managingpartners.com> on 2001/06/04 18:00:18 UTC

Re: ComposerGenerator compose method not throwingComponentException

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

-- 
peter royal -> proyal@managingpartners.com
managing partners, inc. -> http://www.managingpartners.com


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


Re: ComposerGenerator compose method notthrowingComponentException

Posted by Berin Loritsch <bl...@apache.org>.
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


Re: ComposerGenerator compose method not throwingComponentException

Posted by Berin Loritsch <bl...@apache.org>.
Davanum Srinivas wrote:
> 
> Berin,
> Any thoughts? Should we fix this now?

We should not remove the "throws ComponentException" in ComposerGenerator,
or similar classes.  That would preclude the Component from functioning as
it should.

> 
> Thanks,
> dims
> 
> --- Peter Royal <pr...@managingpartners.com> 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
> >
> > --
> > peter royal -> proyal@managingpartners.com
> > managing partners, inc. -> http://www.managingpartners.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

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


Re: ComposerGenerator compose method not throwingComponentException

Posted by Davanum Srinivas <di...@yahoo.com>.
Berin,
Any thoughts? Should we fix this now?

Thanks,
dims

--- Peter Royal <pr...@managingpartners.com> 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
> 
> -- 
> peter royal -> proyal@managingpartners.com
> managing partners, inc. -> http://www.managingpartners.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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