[hibernate-issues] [Hibernate-JIRA] Created: (EJB-330) Calling configure(String) on Ejb3Configuration before addAnnotatedClass(..) breaks callbacks

Tuure Laurinolli (JIRA) noreply at atlassian.com
Wed Jan 16 05:40:56 EST 2008


Calling configure(String) on Ejb3Configuration before addAnnotatedClass(..) breaks callbacks
--------------------------------------------------------------------------------------------

                 Key: EJB-330
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-330
             Project: Hibernate Entity Manager
          Issue Type: Bug
          Components: Documentation, EntityManager
    Affects Versions: 3.3.1.GA
         Environment: Hibernate Core 3.2.5, Hibernate Annotations 3.3.0, Hibernate EntityManager 3.3.1
            Reporter: Tuure Laurinolli
         Attachments: cbtest.tar.gz

If configure(String) has been called on Ejb3Configuration before adding more @Entity-annotated classes with addAnnotatedClass, the @PostLoad callbacks of the classes added with addAnnotatedClass do not work. If the class is added with addAnnotatedClass before configure(String) is called, the callbacks work as expected.

The documentation at http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/configuration.html shows a listing where configure(String) is called before addAnnotatedClass, which in my more minimal test case results in the callbacks on the added class not being called.

The attached test case extracts a directory cbtest with the following files in it: test.xml, test.sh, test/Something.java and test/Test.java. test.sh compiled and runs the test, provided that necessary jars have been copied to cbtest.

The necessary jars are from Hibernate Core 3.2.5, Hibernate Annotations 3.3.0 and Hibernate EntityManager 3.3.1, except for hsqldb.jar, which is needed because the configuration in test.xml expects Hsqldb.

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