You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Vidar Ramdal <vi...@idium.no> on 2010/03/24 09:48:39 UTC
Rewrite MapEntries to OSGI EventHandler
Currently o.a.s.jcr.resource.internal.helper.MapEntries (which
maintain domain mappings) is a javax.jcr.observation.EventListener.
When an event occur somewhere in the /etc/map tree, the MapEntries map
is updated.
In my project I need to provide domain mappings under /etc/map as
non-JCR resources. MapEntries uses the Resource API to iterate through
the resources under /etc/map, so it is quite easy to use resources
instead of nodes to specify domain mappings.
Except for one thing: MapEntries is only updated on a JCR event, so I
currently need to fire that manually when one of my resources has
changed.
Does it make sense to rewrite MapEntries to be a OSGi EventHandler instead?
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070
Re: Rewrite MapEntries to OSGI EventHandler
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Agreed completely.
Regards
Felix
On 24.03.2010 10:32, Carsten Ziegeler wrote:
> Vidar Ramdal wrote
>> Currently o.a.s.jcr.resource.internal.helper.MapEntries (which
>> maintain domain mappings) is a javax.jcr.observation.EventListener.
>> When an event occur somewhere in the /etc/map tree, the MapEntries map
>> is updated.
>>
>> In my project I need to provide domain mappings under /etc/map as
>> non-JCR resources. MapEntries uses the Resource API to iterate through
>> the resources under /etc/map, so it is quite easy to use resources
>> instead of nodes to specify domain mappings.
>> Except for one thing: MapEntries is only updated on a JCR event, so I
>> currently need to fire that manually when one of my resources has
>> changed.
>>
>> Does it make sense to rewrite MapEntries to be a OSGi EventHandler instead?
>>
> I think it makes sense, especially as we are planning to make the
> resource resolver usable in non jcr environments.
>
> Regards
> Carsten
Re: Rewrite MapEntries to OSGI EventHandler
Posted by Vidar Ramdal <vi...@idium.no>.
>> Vidar Ramdal wrote
>>> Currently o.a.s.jcr.resource.internal.helper.MapEntries (which
>>> maintain domain mappings) is a javax.jcr.observation.EventListener.
>>> When an event occur somewhere in the /etc/map tree, the MapEntries map
>>> is updated.
>>>
>>> In my project I need to provide domain mappings under /etc/map as
>>> non-JCR resources. MapEntries uses the Resource API to iterate through
>>> the resources under /etc/map, so it is quite easy to use resources
>>> instead of nodes to specify domain mappings.
>>> Except for one thing: MapEntries is only updated on a JCR event, so I
>>> currently need to fire that manually when one of my resources has
>>> changed.
>>>
>>> Does it make sense to rewrite MapEntries to be a OSGi EventHandler instead?
>On Wed, Mar 24, 2010 at 10:32 AM, Carsten Ziegeler <cz...@apache.org> wrote:
>> I think it makes sense, especially as we are planning to make the
>> resource resolver usable in non jcr environments.
On Wed, Mar 24, 2010 at 11:10 AM, Felix Meschberger <fm...@gmail.com> wrote:
> Agreed completely.
Great => https://issues.apache.org/jira/browse/SLING-1463
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070
Re: Rewrite MapEntries to OSGI EventHandler
Posted by Carsten Ziegeler <cz...@apache.org>.
Vidar Ramdal wrote
> Currently o.a.s.jcr.resource.internal.helper.MapEntries (which
> maintain domain mappings) is a javax.jcr.observation.EventListener.
> When an event occur somewhere in the /etc/map tree, the MapEntries map
> is updated.
>
> In my project I need to provide domain mappings under /etc/map as
> non-JCR resources. MapEntries uses the Resource API to iterate through
> the resources under /etc/map, so it is quite easy to use resources
> instead of nodes to specify domain mappings.
> Except for one thing: MapEntries is only updated on a JCR event, so I
> currently need to fire that manually when one of my resources has
> changed.
>
> Does it make sense to rewrite MapEntries to be a OSGi EventHandler instead?
>
I think it makes sense, especially as we are planning to make the
resource resolver usable in non jcr environments.
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org