avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: avalon newbie: Innocent question, please don't hurt me -- services strategy with Avalon framework
Date Fri, 15 Nov 2002 15:12:32 GMT

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.

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 

Also read all the pages linked at the bottom of this page:

To learn what a container is with an easy learning curve, see Tweety 

> 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.

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

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

View raw message