when the DefaultHibernateConfigurer is calling configuration.configure() Hibernate will try to initialize the SessionFactory using a hibernate.cfg.xml file from the root classpath. there are two problems to this approach: 1) you always have to have a (dummy) hibernate.cfg.xml file in your root classpath and 2) you have to contribute another HibernateConfigurer ("after:Default") that will call configuration.configure("myhibernate.cfg.xml") to override the first call.
Therefore i'd suggest to make the DefaultHibernateConfigurer exchangeable by defining it as IOC service. this would make it possible to define an own DefaultHibernateConfigurer using the Alias service.
|Field||Original Value||New Value|
|Summary||define DefaultHibernateConfigurer as IOC service for easier override||Refactor DefaultHibernateConfigurer as an IOC service for easier overriding|
|Assignee||Howard M. Lewis Ship [ hlship ]|
|Resolution||Fixed [ 1 ]|
|Fix Version/s||5.0.15 [ 12313350 ]|
|Status||Open [ 1 ]||Closed [ 6 ]|
|Workflow||jira [ 12433341 ]||Default workflow, editable Closed status [ 12568573 ]|
|Workflow||Default workflow, editable Closed status [ 12568573 ]||jira [ 12591615 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|84d 12h 28m||1||Howard M. Lewis Ship||08/Sep/08 21:25|