[hibernate-issues] [Hibernate-JIRA] Resolved: (EJB-257) EJB3Configuration should work wo having to call any of the configure(*)

Emmanuel Bernard (JIRA) noreply at atlassian.com
Mon Feb 19 14:38:49 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-257?page=all ]
     
Emmanuel Bernard resolved EJB-257:
----------------------------------

    Resolution: Fixed

> EJB3Configuration should work wo having to call any of the configure(*)
> -----------------------------------------------------------------------
>
>          Key: EJB-257
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-257
>      Project: Hibernate Entity Manager
>         Type: Bug

>   Components: EntityManager
>     Versions: 3.2.0.ga
>  Environment: Hibernate 3.2.0 GA
> Hibernate Annotations 3.2.0 GA
> Hibernate Entity Manager 3.2.0 GA
>     Reporter: Khalil Bouhamza
>     Assignee: Emmanuel Bernard
>     Priority: Minor
>      Fix For: 3.2.2
>  Attachments: EJB3ConfigurationHibernateCfgXmlInitTest.java
>
>
> I am opening this issue following Emmanuel's request on http://forum.hibernate.org/viewtopic.php?p=2332948#2332948
> The tescase attached is a junit Test that shows that an empty hibernate.cfg.xml and the call cfg.configure("/mypath/hibernate.cfg.xml") as shown in  the reference documentation http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/configuration.html#setup-configuration-bootstrapping is needed for EntityManagerFactory programatic construction.
> The TestCase shows two scnerios with and without hibernate.cfg.xml. The scenarios are building a EntityManagerFactory and either try to persist or retrive an entity of type org.hibernate.ejb.test.Distributor included in HEM's test suite. The hibernate.cfg.xml file is genrated at Runtime and deleted upon VM exit, the varaiable HIBERNATE_CFG_XML_DIR should point to a folder on the classpath. It is created within the initWithHibernateCfgXML method and it is really a file with the bear minimum of empty tags. There are four tests, two failing and the other two passing, the passing tests create the temp  XML config file if not already created, and then make the cfg.configure(resource) call, then simply invoke the corresponding failing test. 
> I hope the TestCase and the above explanation are describing the issue properly.
>        

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