[Yanel-dev] Default realm implementation extension

Michael Wechner michael.wechner at wyona.com
Sun Jan 9 17:34:25 CET 2011


Hi Cedric

On 1/6/11 9:16 AM, Cedric Staub wrote:
> Hello
>
> As mentioned on the list yesterday, I worked on the default realm
> implementation to make it possible to access the data, ac-policies,
> ac-identities and res-config repos using getRepository(String id).
>
> This is how it worked before:
> - The data repo was accessible through getRepository()
> - The res-configs repo was accessible through getRTIRepository()
> - Extra repos were accessible through getRepository(String id)
> - The ac-policies, ac-identities repos were not accessible
>
> With my fully backwards-compatible patch, it is now possible to access
> the default repos (data, res-configs, ac-policies, ac-identities) using
> the getRepository(String id) function with the following ids:
>
> yanel_data
> yanel_ac-policies
> yanel_ac-identities
> yanel_res-configs
>
> So getRepository("yanel_data") is equivalent to getRepository().
> The ac-policies and ac-identities repos can now be accessed, too.

I have added this to the JavaDoc
> And on top of that, I made sure all repositories are correctly closed
> when the realm is shutdown/destroyed (ac-policies and ac-identities
> repositories weren't closed before).

We should also do this for the extra repositories, whereas I have added 
a TODO.

Otherwise it looks good and I have committed it:

Sending        src/core/java/org/wyona/yanel/core/map/RealmDefaultImpl.java
Transmitting file data .
Committed revision 55904.

While reviewing I have noticed a bug (which existed before). If one used 
the same extra repository ID within
different realms, then only one of these repositories got initialized, 
because the RepositoryFactories are global.

I have fixed this by adding the realm prefix:

Sending        src/core/java/org/wyona/yanel/core/map/RealmDefaultImpl.java
Transmitting file data .
Committed revision 55905.
> This means that my reindexer resource can now start reindexing processes
> for all possible repositories within a realm.

sounds good. As mentioned above I have added some changes to your patch 
and committed, hence
please make sure to update accordingly
> Patch is attached :-)

Thanks again for your patch

Michael
> Cheers
> Cedric



More information about the Yanel-development mailing list