[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5865) superfluous event listener in Hibernate code

Steve Ebersole (JIRA) noreply at atlassian.com
Fri May 6 09:08:59 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42266#action_42266 ] 

Steve Ebersole commented on HHH-5865:
-------------------------------------

Here is the javadoc link to {{EventContext}}: http://download.oracle.com/javase/1.4.2/docs/api/javax/naming/event/EventContext.html

As you can see, it extends from {{Context}}.  So, again, a JNDI implementor can choose to also provide these "event listener capabilities".  I see from environment section you use JBoss.  JBoss's JNDI implementation does not implement these extra capabilities.

> superfluous event listener in Hibernate code
> --------------------------------------------
>
>                 Key: HHH-5865
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5865
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>         Environment: JBoss EAP 5.1
>            Reporter: Tom Ross
>
> When Hibernate initialises it prints a warning message "InitialContext did not implement EventContext". This is a result of a cast in the SessionFactoryObjectFactory.addInstance() method which is trying to cast javax.naming.InitialContext object to EventContext while trying to add an event listener to it. javax.naming does not implement the interface EventContext so the cast fails and the listener is never register. As it stands this code is completely superfluous at the moment since it is never used.

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