I have tried with Isolation level READ_COMMITTED also.
I have replaced array in my TestEntity object, but still the same problem
Are you running both EJB's in the same JVM? That would explain it, as TX rollback won't affect the changes you've done to TestEntity, only the operations you've done on cache. That is the changes TestEntity.update does on the object won't be affected by the TransactionManager.rollback call. Following will be affected though:
cache.put(fqn, "key", "1"); tm.begin(); cache.put(fqn, "key", "2"); tm.rollback(); assert cache.get(fqn, "key").equals("1") : "this is true, won't fail!!!";
On the other post I saw you're using DummyTransactionManagerLookup. You're running in the application server so use GenericTransactionManagerLookup.
Thank you for timely reply.
Yes, I'm running cache & EJB in same JVM.
This is the case, I need to look for alternative design.
Thank you very much