Created
April 26, 2012 01:18
-
-
Save ggerard/2495008 to your computer and use it in GitHub Desktop.
Spring 3.1, Hibernate 4 and Jboss 7 configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--Transactions are managed by Spring. I am not sure which transaction factory should be used for 'hibernate.transaction.factory_class'. I | |
| feel it should be org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory because we get BMT with Spring. Check | |
| https://hibernate.onjira.com/browse/HHH-7215. So far I have not seen any side effects of this configuration probably because Jboss TS | |
| transaction related data is thread bound and both UserTransaction and TransactionManager implementations will have reference to transaction | |
| instance with same state.Please comment if you see any side effects of this configuration--> | |
| <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> | |
| <property name="dataSource"><ref bean="dataSource" /></property> | |
| <property name="hibernateProperties"> | |
| <value> | |
| hibernate.dialect=org.hibernate.dialect.Oracle10gDialect | |
| hibernate.bytecode.use_reflection_optimizer=true | |
| hibernate.cache.use_second_level_cache=true | |
| hibernate.cache.use_query_cache=true | |
| hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory | |
| hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform | |
| hibernate.transaction.factory_class=org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory | |
| hibernate.hbm2ddl.auto=update | |
| hibernate.show_sql=false | |
| </value> | |
| </property | |
| </bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment