Thanks for the reply.
In my case, I am not using Infinispan as a second level cache. We have an EAR deployed in clustered environment.
We are using infinispan cache for caching POJO objects. When an object is updated on one node, we need to call map.put() explicity to replicate the data to other nodes in the cluster.
In POJO cache, this functionality was provided by using byte code weaving. Is there any plan to add same functionality in infinispan?
Hibernate OGM is not related to second level caching, it's related to having a transactional context to store mapped POJOs in any grid.
It implements the JPA API, so it should be trivial to use; you could checkout the source code and look at the tests to get familiar with it.