[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2337) Setting session-specific event listeners

Wouter Lievens (JIRA) noreply at atlassian.com
Tue Jan 2 08:55:44 EST 2007


Setting session-specific event listeners
----------------------------------------

         Key: HHH-2337
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2337
     Project: Hibernate3
        Type: Improvement

  Components: core  
 Environment: Hibernate 3.2.0, MySQL 5
    Reporter: Wouter Lievens
    Priority: Minor


Event listeners can be assigned programmatically to the Configuration object, but not to the Session or SessionFactory object.
I want to be able to assign a new event listener, with different state, each time I create a new Hibernate session (or Factory).

There is a workaround: you can cast the session factory to SessionFactoryImpl and use getEventListeners on that class, but since this is a "hack" it's unwise to leave it at that. The SessionFactory interface could be extended with the method getEventListeners, allowing to modify the EventListeners at that point, but maybe this issue goes deeper than just that.


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