[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2770) Action observers for event listeners
Steve Ebersole (JIRA)
noreply at atlassian.com
Thu May 5 09:15:59 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42255#action_42255 ]
Steve Ebersole commented on HHH-2770:
-------------------------------------
This should be pretty easily doable if you wanted to give it a shot. We will simply not have time to get this done in 4.0 timeframe ourselves. I think the best approach is:
# Add a {{org.hibernate.action.spi.ActionObserver}} interface
# Alter {{org.hibernate.engine.spi.ActionQueue}} to:
## hold a collection of {{org.hibernate.action.spi.ActionObserver}} instances
## leverage a {{java.util.ServiceLoader}} to locate {{org.hibernate.action.spi.ActionObserver}} instances (see {{org.hibernate.integrator.internal.IntegratorServiceImpl}} if you need example)
## call the observers for each action ({{org.hibernate.action.spi.Executable}}) in {{org.hibernate.engine.spi.ActionQueue#execute}}
> Action observers for event listeners
> ------------------------------------
>
> Key: HHH-2770
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2770
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Reporter: Christian Bauer
> Priority: Minor
>
> Talked to Steve about a feature he calls "action observers", which would allow the following use case:
> - Write a FlushEventListener
> - Observer for what has been deleted, inserted, updated (action queues)
> This removes some of the pain that comes from missing communication between listeners. For example, you can easily move code you would traditionally write in an Interceptor into a FlushEventListener if you only need inserted/deleted/udpated records.
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list