datasource.hibernate.cfg.xml has hiberanteProperties and all the mapping resources.
But right now I have to define mapping resources and properties in applicationContext.xml separately.
Can I just specify datasource.hibernate.cfg.xml as configLocation inside <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"> and get rid of both mappingResources and hibernateProperties. Right now my application context looks like this:
<property name="mappingResources"/>
<list>
<value>../../src/editsolutions.hibernate.cfg.xml</value>
</list>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.connection.isolation">3</prop>
<prop key="hibernate.current_session_context_class">jta</prop>
<prop key="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</prop>
<prop key="hibernate.transaction.manager_lookup_class">
com.atomikos.icatch.jta.hibernate.TransactionManagerLookup
</prop>
</props>
</property>
Note: I don't use annotations for entity classes. It's a legacy project and everything is defined via hbm.xml.