[Yanel-dev] Introducing the custom realm class loading

Josias Thöny josias.thoeny at wyona.com
Thu Nov 29 09:13:26 CET 2007


Michael Wechner wrote:
> Hi
> 
> After giving some more thought to resource init/destroy methods (resp. 
> sleeping some hours last night ;-) I think it probably would make more 
> sense to introduce something like
> 
> <?xml version="1.0"?>
> <realm-config xmlns="http://www.wyona.org/yanel/realm/1.0" 
> class="foo.bar.CustomRealm">
>  <foo:bar xmlns:foo="http://foo.bar">...</foo:bar>
> 
> 
> whereas foo.bar.CustomRealm extends the org.wyona.yanel.core.map.Realm
> 
> 
> First of all this would help that the core Realm doesn't have to provide 
> a WebAuthenticator interface by introducing a WebRealm class and it 
> would also help to stuff like loading a custom repository or whatever.
> 
> WDYT?

Seems to be a good idea.
This would make it a lot easier to add custom stuff to a realm.

josias

> 
> (of course the init/destroy methods probably still make sense, but since 
> resources can be used globally, it would make more sense to delegate the 
> realm specific extra repo loading to the realm instead to the resource. 
> OTOH if the resource has to know about this custom realm and its custom 
> methods then it might lead to ClassCastExceptions if not being used 
> properly)
> 
> Cheers
> 
> Michi
> 



More information about the Yanel-development mailing list