avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harmeet Bedi" <hb...@yahoo.com>
Subject Re: [Proposal] Should we introduce a new idiom for Components?
Date Thu, 17 May 2001 02:16:11 GMT
[Berin Loritsch]
> I am specifically thinking about the Excalibur components.  In order to
> the Role names being correct, I am proposing that we augment the work
> with the following idiom:
> interface DataSourceComponent {
>     String ROLE =
>     Connection getConnection();
> }
> That way when we wanted to use the Component, we can take advantage of the
> fact that we already have the interface imported:
> manager.lookup(DataSourceComponent.ROLE);

Why not change the lookup method to take an interface rather than a string
as a parameter.

So it would be
DataSourceComponent dataSource =

That way not only do you get the idiom without adding the 'ROLE' member, but
also do a lookup for a role, and in Java one could argue Interface is Role.

What do you think ?

Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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

View raw message