I have two applications using same database entities. Both applications are deployed on jboss eap 6.2 separate clusters. DB tables are updated only from one application but are read from both applications. Both applications are using native hibernate APIs to read/write data from database.
After enabling infinispan as 2LC in embedded mode, how do I ensure that cache entities updated in one application are invalidated from 2nd application cache? Any JMX/JMS interface to signal cache invalidation?
If I go for remote cache mode and start infinispan as hot rod server, then cache server can be shared with both application. But then do i need to update code to query entities from cache using hot rod client API's? Also will it update/invalidate the cache automatically if entity is updated from application.