I've read all that.. . It left me with a "now what" feeling...

Nicola Ken Barozzi wrote:


Andrew C. Oliver wrote:

> Some time ago someone sent me some ideas on how to use avalon in a
> service based strategy such that it would be more containment based
> than inheritance based (and bare will me that I regard interface
> implementation as inheritance because its "is a" not "has a").
> Basically, I don't want everything to implement 10 different
> interfaces.  i'd rather null operations...  So I lost the message
> (long story short, fired, lost laptop, rehired by same company in
> different group, new laptop...stupid mozilla default settings had
> deleted mail of my server against my will).. But I'm ready to do it
> now ;-)
>
> What I basically want is:
>
> public class AbstractService implements x, y, z, ... {
>
> ??
>
> public SomeType someLifecycleMethodImNotUsing() {
>   return null;
> }
>
> }
>
> What are the x, y, and zs that I should most likely use?  And what
> else do I need?


The x,y and zs are the Avalon lifecycle interfaces.
http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html

An Avalon Component implements the interfaces it needs.
An Avalon Container calls them on the Component honoring the Avalon
lifecycle contract defined in the above URL.

If you declare all of them in the abstract class, all will be called and
possibly not used.
This could be bad performance-wise, but it basically defeats the purpose
of using the interfaces to declare easily what the Component requires.

Anyway, to have more info, there is a booklet about how to develop with
Avalon:
http://jakarta.apache.org/avalon/developing/developing-with-avalon.pdf

Also read all the pages linked at the bottom of this page:
http://jakarta.apache.org/avalon/framework/index.html

To learn what a container is with an easy learning curve, see Tweety
http://jakarta.apache.org/avalon/excalibur/tweety/index.html

> In short my application is a reporting service which lets me pull from
> a number of data sources, execute various transformations and get out
> a report via various delivery methods.  So I have DataProviderService
> which has for instance a JDBCService which can process QueryDefs to
> get stuff from a database (I don't ermember the names I have thus
> far).  So far I've stubbed most things out and I'm fairly happy with
> it, but I'd rather not re-invent the wheel, hence my interest in using
> Avalon in place of the little "Service" and "ServiceManager" classes I
> used as placeholders..
>
> Thoughts?


Your request is too generic IMHO.

Read the above and take a look at two tutorial containers called Egg
(look at that firs, it's in the Tweety project) and Tweety itself.




--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@;jakarta.apache.org>

Reply via email to