Spring is used in our Java EE project team, and hibernation is used for basic ORM.
transactionManager is installed as follows:
<bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
sessionFactory is set as follows:
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan"
value="com.company.model" />
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.show_sql=true
hibernate.jdbc.fetch_size=50
</value>
</property>
</bean>
my quesiton defines the whole setting, I have not seen any property settings for the hibernate session life cycle. Context sessions were introduced in the hibernate help system, and he said that there are three implementations of CurrentSessionContext.
How to find out which implementation was used. Maybe Spring, but I have no idea.
source
share