avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: SuperServicable
Date Sun, 02 Jun 2002 13:11:35 GMT
On Sun, 2 Jun 2002 18:27, Paul Hammant wrote:
> Pete, folks,
>
> Introducting SuperServicable (for want of a better name).  Driven by the
> belief that service(..) could be a little more in accordance with the
> IoC pattern.  Also inspired by recent xdoclet changes:
>
>    public void service(ServiceManager serviceManager) throws
> ServiceException {
>        aThing = (AThing) serviceManager.lookup("thing-blah-role");
>    }
>
> If we had ....
>
>   /**
>     * @phoenix:dependency name="somepackage.SomeService" type="direct"
>     */
>    public void setAThing(AThing aThing) {
>        this.aThing = aThing;
>    }
>
> .... then a reflection using adapter could invoke these methods during
> lifecycle at the same point that Serviceable would have been invoked.
>
> Thoughts?  Neat? Too much work for such a small thing ?

Interesting idea but I am not sure what it would gain you. Sure its possible 
but I guess the question becomes why use it. A simple "void service(SM)" 
method is less code and simpler IMHO. 

-- 
Cheers,

Peter Donald
 "Man's mind stretched to a new idea never goes back to its original 
dimensions." -Oliver Wendell Holmes 


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


Mime
View raw message