Harmeet Bedi wrote:
> 
> Peter, thanks for the clarification.
> 
> How about instead of ROLE member having this idiom.
> DataSourceComponent dataSource =
> 
> (DataSourceComponent)manager.lookup(DataSourceComponent.class.getName());
> 
> With  ROLE the code would look like this
> DataSourceComponent dataSource =
>     (DataSourceComponent)manager.lookup(DataSourceComponent.ROLE);
> 
> Not too much of a difference, but the former avoids adding an additional
> constant to each interface    . I think it would be good to avoid adding
> things if the language can provide a nice way.  Either way, it is sort of
> philosophical and not too much of deal. As a user I would be happy either
> way, but would prefer the former.

That only works in the case where interface name == role name.  While this
is the majority of cases, it is not all of the cases.  Please see my other
post.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to