jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Synchronous event listener
Date Mon, 19 May 2008 09:06:39 GMT
Hi Roman,

if you need to write auxiliary data on modifications then you should rather use 
async notification because you should not modify content in an synchronous event 
listener. it is true that there is no guarantee when an async event listener is 
called, but usually that happens only a short time after a change was committed.

regards
  marcel

Roman Puchkovskiy wrote:
> Hi, Marcel, thanks for explanations :)
> 
> In our application there're different ways to create data nodes. When 'data
> node' is created, we need to add some more records to other parts of
> repository (auxiliary data). Some of those different ways used for creation
> of data nodes are 'internal' (i.e. fully made by our code) - with them no
> problems exist: we just create 'data node' and auxiliary data in one
> transaction. But there're some 'external ways' to create data node (for
> instance, through WEBDav) where we need to react on creation of node and
> augment it with auxiliary nodes.
> 
> We decided that event listeners are what we need. But we need to create
> 'auxiliary data' for 'external modification' as soon as possible after
> creation of 'data node', and we thought that sync notification will be more
> convinient then async one. Maybe we're just fooled by fact that some systems
> treat async notification as low-priority process which may happen in any
> moment in future...
> 
> How do you think, does this make sence or async event listener will be
> enough?
> 
> 
> Marcel Reutegger wrote:
>> why do you need a synchronous event listener?
>>
> 


Mime
View raw message