[jbosscache-dev] Notification interceptor

Ben Wang ben.wang at jboss.com
Sat Sep 16 23:41:14 EDT 2006


Bela is right. One other thing that I remember to discuss was to batch the notification events under tx (if there is one). It is only doable if it is done in a notification interceptor, perhaps.

For current PojoCache impl, I was originally gunning for a notification interceptor, but had to abandon it because of granularity. For instance, if I do a detach(id), I should emit an pre- and post- notification if it return a POJO. But if it returns null (meaning no POJO is associated with that ID), there should be no need for a notification event. Of course, it is suffering the same problem of tx rollback.

So if there is a good methodology, I can adopt it as well. 

-----Original Message-----
From: jbosscache-dev-bounces at lists.jboss.org [mailto:jbosscache-dev-bounces at lists.jboss.org] On Behalf Of Bela Ban
Sent: Sunday, September 17, 2006 3:50 AM
To: Manik Surtani
Cc: jbosscache-dev at lists.jboss.org
Subject: Re: [jbosscache-dev] Notification interceptor

Let's find the bits and pieces of emails between us and Hany, we discussed this feature in great detail. IIRC, one of the issues was that there was no real good place for the NotificationInterceptor, in some cases towards the top would have been okay, in some not. Example: 
CacheLoader/Store interceptor: those methods don't get passed up, so a NotifInt towards the top would not be able to catch them.

But, yes, we need to start thinking about having all notifications emitted from one place, so let's kick-start that thought process again. 
Even if we end up having only 95% of all notifications emitted from the interceptor, and the rest directly, that would be fine too.

Manik, maybe it is a good idea to involve Hany again, because he was involved real deep before... I'm sure he remembers some of the discussions...

Manik Surtani wrote:
> Hi,
>
> There was talk of a separate notification interceptor some while back.  
> What happened around this?
>
> Looking at wiring in the relevant notifications for move() and realise 
> what a PITA it is with notification calls scattered all over the code 
> base.
>
> I think an interceptor at (or close to) the head of the chain to fire 
> notifications would be quite straightforward and easy - pre and post 
> notifications would be easily handled.  The only notification that 
> would originate outside of this interceptor would be 
> load/evict/activate/passivate notifications ...
>
> What do people think?
>
> Cheers,
> --
> Manik Surtani
>
> Lead, JBoss Cache
> JBoss, a division of Red Hat
>
> Email: manik at jboss.org
> Telephone: +44 7786 702 706
> MSN: manik at surtani.org
> Yahoo/AIM/Skype: maniksurtani
>
>
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>

--
Bela Ban
Lead JGroups / Manager JBoss Clustering Group JBoss - a division of Red Hat

_______________________________________________
jbosscache-dev mailing list
jbosscache-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosscache-dev




More information about the jbosscache-dev mailing list