Hi, I'm assuming that's an Infinispan CacheManager?
There are several things to consider:
- When Infinispan is configured with DIST_SYNC the size() operator is not accurate, it will only show the size of the local node, not the whole content of the data grid.
- you're creating a new CacheManager, not taking the instance which OGM is using. That could work as long as this CacheManager connects to the other one, but you're effectively needing to rebalance the cluster: rebalancing is automatic but happens in the background, it likely didn't even finish connecting if you don't give it some wait time.
- the cachename must match exactly - not sure if that cache name is the one you've configured OGM to use?
It would be easier to extract the reference of the Infinispan cache from the emf.
_________________ Sanne http://in.relation.to/
|