[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5562) Improve how event listeners are handled and introduce a serivice pattern for integrators to leverage

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Sep 15 10:03:22 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-5562:
--------------------------------

    Attachment: HHH-5562.patch

Patch of initial attempt maintaining backwards compatibility.  Unfortunately it lead to many regression errors which manifested in strange test failures that made it difficult to track down the real cause.  Anyway I was not a fan of the hacks I needed to put in place for backwards compatibility.  

Lets revisit this for 4.x as we can drop the backwards compatibility (of exposing {{EventListeners}} directly from {{Configuration}} and {{SessionFactory}}).

Specifics about the patch:
# Really liked the "configuration time" aspect with the {{org.hibernate.event.EventListenerRegistry}} and {{org.hibernate.event.RegisteredEventListeners}} classes.  Not sure about the names; perhaps {{EventListenerRegistry}} (listeners for given type) and {{EventListenerRegistryRegistry}} (listener registry, per type via map) are better
# Really really liked the definition of org.hibernate.event.EventType
# {{org.hibernate.event.spi.EventListenerRegistrationService}} defined the registration service contract, the idea being we'd look for a file named {{META-INF/org.hibernate.event.spi.EventListenerRegistrationService}} via classpath which would name implementations of {{org.hibernate.event.spi.EventListenerRegistrationService}} to load and execute
# New explicit exception type for listener registration problems, rather than odd errors like ArrayStoreException etc

> Improve how event listeners are handled and introduce a serivice pattern for integrators to leverage
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HHH-5562
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5562
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.6.0.CR1
>
>         Attachments: HHH-5562.patch
>
>
> Main points:
> # de-dup listener instances registered by classname
> # define a service pattern to allow integrations (search, validator and envers as main targets) to auto register their event listeners

-- 
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