Event System With Phased Appraoch
---------------------------------
Key: HHH-3132
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3132
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.6
Environment: 3.x
Reporter: Anirudh Vyas
Hibernate currently lacks proper event Delegation model;
Granted it has a hook for listeners and iterates through them to find out which is
appropriate or not.
But a better way would be to add "Queuing of events" approach; meaning each
event is first queued (for firing) and then Hibernate goes through cycles of phases (it
can be internally thought of as a Phase 1 ---> Phase 2 ---> Phase 3 ). and each
phase has a queue of events it has to process. A phase can have corresponding listener to
process phases and clear the queue of events associated with it ( meaning events set to
"fire" in the currently executing phase).
All event creation should be centralized and all events should be queued through a
factory. A flexible approach (ideally) would be to allow users to create Custom phases to
enhance lifecycle of their own Application using Hibernate's Phase interface.
"Phase implementation " could include usage of Enums, but its not mandatory ( so
long as we are worried about back-wards compatibility).
As it is, Hibernate Event system is poorly documented and not very well understood.
What do you guys think ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira