jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tri...@apache.org>
Subject Re: Make "Whiteboard" accessible through ContentRepository
Date Wed, 12 Feb 2014 00:38:15 GMT

On Tue, Feb 11, 2014 at 1:59 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> On Mon, Feb 10, 2014 at 2:25 AM, Felix Meschberger <fmeschbe@adobe.com> wrote:
>> This thread indeed raises the question, why Oak has to come up with something (the
>> that is almost but not quite like OSGi instead of going all the way through ?
> This is a misunderstanding; we're not trying to reinvent OSGi.
> The Whiteboard interface is *only* an abstraction of the whiteboard
> pattern described in
> http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf, and is used
> only for those cases in Oak where that pattern is useful. When running
> in an OSGi environment, the Whiteboard simply leverages the existing
> OSGi functionality.
> The Whiteboard in Oak is not a generic service registry, and is not
> supposed to become one.
but then, why does the Whiteboard interface has a register() method?
This indicates to me, that there is a global service registry behind
that can be used by all other users of the whiteboard.

Also, using the whiteboard in the tests make them very easy
configurable and simulates a bit better how OSGi will work. for
example in the ExternalLoginModuleTest, I can just do:

        whiteboard = oak.getWhiteboard();
        whiteboard.register(SyncManager.class, new
SyncManagerImpl(whiteboard), Collections.emptyMap());
        whiteboard.register(ExternalIdentityProviderManager.class, new
ExternalIDPManagerImpl(whiteboard), Collections.emptyMap());

If I need to register them with the login module, this would not work
today, without hard wiring all possible services to the
Regards, Toby

View raw message