On 28 Feb 2007, at 15:27, Anahide Tchertchian wrote:
You can now define orders for core event listeners: this may be
useful if different listeners have to react in a specified order.
If no order is given, order 0 is assumed. Negative orders are
accepted. Listeners can share the same order, but the notification
order will not be reliable.
Orders have been defined for some of nuxeo 5 listeners, please feel
free to add it on missing ones if you think it is important.
For now, listeners without any order set are notified first, then
notifications to the runtime layer are performed, then document
related notifications (uid generation, dublincore...), and jms
forwarding is done almost last: the context map attached to the
document is cleaned at the end.
I wasn't sure were to add versioning related listeners so their
order is not set right now.
In the interest of a refactoring in the future where we'd use before/
after dependencies instead of integers, could you please explain why
the given events have to be run before or after others? Could you
reformulate the ordering in terms of before/after ? For instance,
document-related must be after runtime because XXX, or JMS must be
after document because YYY.
Thanks,
Florent
You can also filter in the xml extension on which event ids the
listener will react. the notifyEvent method of you listener will
not be called at all if the event id does not match the
configuration. This can allow you to avoid having on testing the
event type before processing it in you listener.
So you can add multiple <eventId>theEventId</eventId> tags in the
listener xml description. This has not been set for default
listeners (just in descriptions for tests). If no eventId
attributes are defined, the listener is notified for all events.
Regards,
--
Anahide Tchertchian, Nuxeo
Mail: [EMAIL PROTECTED] - Tel: +33 (0)1 40 33 79 87
http://www.nuxeo.com - http://www.nuxeo.org
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm