Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Girija Sammeta

+ Follow
since Sep 23, 2013
Girija likes ...
Hibernate Java Oracle
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Girija Sammeta

Hi All

My application is using Spring and Hibernate. We wanted to use hibernate 2L cache and Redis as cache provider. This is how spring context xml looks like
<bean id="sessionFactory"
<property name="dataSource">
<ref bean="dataSource" />
<property name="mappingLocations">
<property name="packagesToScan" value="com.apll.lss.gsp.model," /> ...etc
<property name="hibernateProperties">
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.connection.SetBigStringTryClob">true</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.redis.SingletonRedisRegionFactory</prop>
<prop key="hibernate.cache.region_prefix">hibernate</prop>
<prop key="hibernate.cache.use_structured_entries">true</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.jdbc.use_get_generated_keys">true</prop>
<prop key="hibernate.cache.provider_configuration_file_resource_path"></prop>

But only Entities declared under "mappingLocations" are cached even without adding <Cache>. But @Entity classes are not caching even adding @Cache.

Can anyone please help me with this? Is this behavior or Hibernate 2L?

9 months ago
Hi, I am not able to register for OCMJEA 5, it is allowing me to register for 6 alone.
Can some one help how to register for 5
I too checking for the same. I am going through 2nd edition, in Web tier technologies, OCMJEA 6 is not covered it seems. Correct me if i am wrong. Am i referring right edition?