[Yanel-dev] Introducing the custom realm class loading

Michael Wechner michael.wechner at wyona.com
Thu Nov 29 08:29:21 CET 2007


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?

(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

-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list