avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <Paul_Hamm...@yahoo.com>
Subject Re: Mulitple components of same ROLE
Date Thu, 06 Jun 2002 04:40:49 GMT

Multi-realm ideas are great lads :-)

>So, if we
>decide to support multiple realms how do we provide multiple components
>that implement the same role (in this case Realm) to a Serviceable
>component?  Or would that not be the right interface to implement? 
>What, other than Serviceable, should it become to accomplish this?
Well here is an idea....

Have a RealmDelegate block - it is the thing that implements the 
 "org.apache.avalon.cornerstone.services.security.Realm" ROLE

It has multiple implementations : JAASRealmDelegate, PAMRealDelegate & 
JAASnPAMRealmDelegate.  These probably share a parent class (some 
glorified hashmap).  The trick is that each hasa different service(..) 
method and looks up more strongly typed services as their class name 
would hint :

class JAASnPAMRealmDelegate extends AbstractRealmDelegate {
  public void service(ServiceManager sm) throws ServiceException{

This solution, if it is workable, is based on the fact that ROLE need 
not be a class name, it is just a string that si expected to have some 

- Paul

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>

View raw message