<shared-cache-mode>
Is not a persistence unit property, but an element in the persistence.xml. I'm not sure what setting "javax.persistence.sharedCache.mode
" as a property does, but my guess is it is just set as a persistence unit property, and ignored.
But default, EclipseLink enables the shared cache, so you do not need to configure it.
If you are not seeing caching being used, it could be because of the Spring bug, https://jira.springsource.org/browse/SPR-7753, in which case there is a workaround using setLazyDatabaseTransaction()
option in the EclipseLinkJpaDialect.
ENABLE_SELECTIVE I think mean only enable caching for Entities that have @Cacheable(true)
, so that may not be what you want.