Richard,
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{
realmMap.add("jaas",sm.lookup("org.apache.avalon.cornerstone.services.security.Realm:JAAS"));
realmMap.add("pam",sm.lookup("org.apache.avalon.cornerstone.services.security.Realm:PAM"));
}
}
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 theme.
- Paul
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
