-
1. Re: Infinispan required all the pojo classes to implement Serializable.
rvansa Aug 6, 2018 7:16 AM (in response to omverma22)http://infinispan.org/docs/stable/user_guide/user_guide.html#marshalling See the marshalling chapter.
-
2. Re: Infinispan required all the pojo classes to implement Serializable.
omverma22 Aug 7, 2018 12:35 AM (in response to rvansa)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.
public class MyExpressionEvaluator extends ExpressionEvaluator implements Serializable {}
Since it is super class, so some private variables in ScriptEvaluator will not be available. Thats why my code is failing. Any thought.
Thanks,
Om -
3. Re: Infinispan required all the pojo classes to implement Serializable.
galder.zamarreno Aug 9, 2018 11:46 AM (in response to omverma22)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.
-
4. Re: Infinispan required all the pojo classes to implement Serializable.
omverma22 Aug 10, 2018 2:46 AM (in response to galder.zamarreno)Thank you so much. I will try to fix those by following these steps.
Thanks,
Om