[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-6938) Clarify the use of getHibernateConfiguration and Configuration handling with JPA bootstrap

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Jan 5 09:37:13 EST 2012


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

Steve Ebersole closed HHH-6938.
-------------------------------

    Resolution: Rejected

> Clarify the use of getHibernateConfiguration and Configuration handling with JPA bootstrap
> ------------------------------------------------------------------------------------------
>
>                 Key: HHH-6938
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6938
>             Project: Hibernate Core
>          Issue Type: Task
>    Affects Versions: 3.6.5
>            Reporter: Stephane Nicoll
>
> Hi,
> I am willing to register custom types automatically when our application starts. We are using JPA2 and the EntityManager.
> To do so I can use a method on the Configuration object (registerTypeOverride). When configuring the JPA container, the PersistenceProvider can be extended. That's what I am doing but I came to this code (Ejb3Configuration on 3.6.5)
> {code:java}
>        /**
> 	 * This API is intended to give a read-only configuration.
> 	 * It is sueful when working with SchemaExport or any Configuration based
> 	 * tool.
> 	 * DO NOT update configuration through it.
> 	 */
> 	public AnnotationConfiguration getHibernateConfiguration() {
> 		//TODO make it really read only (maybe through proxying)
> 		return cfg;
> 	}
> {code}
> I believe there is a TODO here that may lead to a change that would disallow me to use the configuration object to register new types on startup. If this TODO gets ever resolved (why?), what could I do to register new types? 
> Thanks

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list