I'm trying to subscribe to Session.Persisting event, and want to do some post-processing in this event. Or Is there any want to inject my own Persisting handler or smth into Session? Updated at 22.04.2010 7:52:39Just tried to implement my own ChainingSessionHandler. Got a nice problem. Why do you mark Session.Handler internal?? Now i'm unable to do so: var handler = new OperationalSessionHandler(e.Session.Handler) This thread was imported from our support forum. The original discussion may contain more detailed answer. |
The main answer: see Audit Sampel for DO4, in fact it takes care of this: http://goo.gl/Bqrq Concerning your own SessionHandler:
Domain module is used just to ensure audit works @ every Session. So you don't need it - you should just subscribe to events. SessionHandler is very low-level API - it is attractive when you need no intercept low-level oeprations, and moreover, change their results. In your case it's really better to subscribe to these 3 events. Btw, see VersionValidator and VersionCapturer - they're much better "template" for this task. Moreover, as far as i can judge, you use a Domain module? So why use domain module and dont use a session module/session handler? main answer: ok, thx, looks like what I want
|