[Opensource] addCacheEventListener (was
ObservableDBObject: subscribing...)
larry hamel
expresso at codeguild.com
Thu Apr 24 17:00:40 PDT 2003
This functionality already exists in DBObject as
public static synchronized void addCacheEventListener(
String senderClass,
CacheEventListener newListener)
the implementation is kinda dumb, but this is what I needed in API and intent. I didn't make myself clear in my question...
larry
At 09:32 AM 4/23/2003, you wrote:
>At 12:42 AM 4/23/2003 -0700, you wrote:
>>hi,
>>
>>An application needs to know when a certain type of DBObject (call it ObservableDBObject) is added, updated, or deleted, in order to maintain a cache.
>>
>>The object could have some kind of static subscriber list (java.util.Observable?) and issue events as appropriate.
>>
>>Is there a better way? Has anybody done this already?
>
>
>Larry,
>
>This has been started several times in various formats. The code called SysEventHub was Mike N's last start in that. It's completely agreed that something like this is needed.
>
>My only concern that I've seen so far is instantiation order. There's several places that implement UserListener, for example, but were never instantiated and thus properly registered as UserListeners. [eforum still needs to be fixed in this way]
>
>So we need is a lifecycle event somehow where DBObjects are initialized, which allows them to register listeners to various other dbobjects. [Also, how do we determine initialization order?]
>
>Currently on initialization, Schemas load DBObjects, so it would probably be when the DBobjects are initially loaded.
>
>Anyway, that's my thoughts on the issue ;)
> -Mike
>
>
>
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list