<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.10.1">
</HEAD>
<BODY>
On Tue, 2006-06-06 at 13:32 +0200, Philipp von Weitershausen wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">> My goal is to use request annotations to reference several objects that</FONT>
<FONT COLOR="#000000">> should be treated after the main request process is done, and then to</FONT>
<FONT COLOR="#000000">> subscribe to this event to fire these final modifications (so that, for</FONT>
<FONT COLOR="#000000">> example, "IObjectModifiedEvent" is not fired too many times). Is it the</FONT>
<FONT COLOR="#000000">> good approach ?</FONT>
<FONT COLOR="#000000">Why are you concerned about IObjectModifiedEvent being fired too many times?</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
Thanks for your previous explanations : it's clear in my mind, now !<BR>
<BR>
My first idea with this problem was to say : a content object can be modified several times during a request execution, sometimes by other content objects and not only by simple editing forms (which automatically fire IObjectModifiedEvent), and I want some kind of expensive application logic (for example, reindexing) to be applied only once, when all modifications are done.<BR>
So the IEndRequestEvent was, to me, a good place to handle this kind of methods ; but your previous explanation show that I was wrong.<BR>
I also thought about using some kind of request annotations or volatile attributes, but as event handlers are fired synchronously, I thing that I can't know if there are more modifications to come before the end of the request or not.<BR>
In fact, I thing that what I should need is a kind of "IBeforeEndRequestEvent", an event which would be fired before the end of the request, but when transactions and local utilities are still available...<BR>
<BR>
Of course, any kind of complement would as always be very welcome...<BR>
<BR>
Thanks,<BR>
Thierry<BR>
<BR>
</BODY>
<br />--
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</HTML>