Using Spring 3.2.0, Eclipselink 2.5.0-M9
When persistence.xml contains:
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
Then if I examine the EntityManagerFactory during runtime, via emf.getProperties(), this property is not set.
However, if I put it in my Spring entityManagerFactory configuration instead:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
...
<property name="jpaPropertyMap">
<map>
<entry key="javax.persistence.sharedCache.mode" value="ENABLE_SELECTIVE" />
</map>
</property>
</bean>
Then I can retrieve the property from emf.getProperties()
Also, it appears that when using the spring config, the shared cache is not actually enabled. this leads me to believe that I'm not setting it correctly in the spring container.
Ideas?