Niels Van Haren
Niels Van Haren

Reputation: 440

Hibernate 4 + Spring 3.1 Configuration Object

Im migration from a hibernate 3 application to a hibernate 4 application.

Currently trying to figure out how to get a configuration object from the hibernate4 LocalSessionFactoryBean found in org.springframework.orm.hibernate4.LocalSessionFactoryBean.

In the org.springframework.orm.hibernate3.LocalSessionFactoryBean class there is a getter method for the Configuration class.

In hibernate4 they use a LocalSessionFactoryBuilder (wich extends the configuration object) as a preperation of the serviceregistry. In version 3 you are able to get this configuration object, in version4 it is prohibited, why ? and how am i still able to get this object?

Greetz

Niels

Upvotes: 4

Views: 1617

Answers (2)

Niels Van Haren
Niels Van Haren

Reputation: 440

For the time being, just copy the localsessionfactorybean and expose the configuration object (sessionfactorybuilder)

Upvotes: 0

James Scriven
James Scriven

Reputation: 8134

There is a bug reported about this. It looks like this will be added back in Spring 3.1.1.

https://jira.springsource.org/browse/SPR-8961

Upvotes: 1

Related Questions