Hi
All the example I have found regarding integration of Spring and Hibernate do not mention how to additionally integrate caching information when setting up secondary cache such as ehcache.
So far I ahve this:
<bean id="mySessionFactory" class="org.springframework.orm.hibernate.LocalSess ionFactoryBean">
<property name="dataSource"><ref local="myDataSource"/></property>
<property name="mappingResources">
<list>
<value>com/invest/model/AssetCatgry.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.M ySQLDialect</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.connection.driver_class">com.mysql. jdbc.Driver</prop>
<prop key="hibernate.connection.username">root</prop>
<prop key="hibernate.connection.password">tennis</prop>
<prop key="hibernate.connection.url">jdbc:mysql://localhost:3306/invest</prop>
<prop key="hibernate.hibernate.cache.provider_class">net .sf.hibernate.cache.EhCacheProvider</prop>
<prop key="hibernate.hibernate.cache.use_query_cache">tr ue</prop>
</bean>
however I need to specify the following attribute to indicate to Hibernate that I am using a second level cache.
<class-cache
class="com.invest.model.AssetCatgry"
usage="read-only"/>
How do I do this in Spring?
THanks
Alex


Reply With Quote