I am new to Infinispan and implementing the same in Distributed mode. Before we were using Caffeine cache, that does not support Distributed and replicated cache. We have deployed our servers into multiple aws instances, all those should have updated key value in cache. Now trying to implement Infinispan, but it requires all the classes to implement serializable. Even the third party objects are also required to implement serializable. Any other way to achieve it ?

Thanks for your time. But I am stucked in 1 place. I am using a third party api org.codehaus.janino.ExpressionEvaluator which extends ScriptEvaluator. I am saving object of ExpressionEvaluator into the cache. Here are the steps I used to manage this class to be serializable.

If using third party classes, the best should be to create a separate Externalizer implementation for ExpressionEvaluator. The documentation explains how to do that. I'm not sure you can make a class Serializable if the super class is not. However, when it comes to the private variables in ExpressionEvaluator, you either somehow avoid touching those, maybe by finding a way to recreate the instance with variables you pass in, or you use reflection to access private fields, or you store something other than ExpressionEvaluator.