I am trying to use custom transaction manager with ignite however it causes Failed to deserialize object with given class loader on startup.
The Transaction Manager Factory is implemented as
public class TransactionManagerFactory implements Factory<TransactionManager> {
private static final long serialVersionUID = 1L;
private TransactionManager txMgr;
public TransactionManagerFactory(TransactionManager txMgr) {
this.txMgr=txMgr;
}
@Override
public TransactionManager create() {
return this.txMgr;
}
}
The Factory is attached to client config as following:
TransactionConfiguration txConfiguration=new TransactionConfiguration();
txConfiguration.setDeadlockTimeout(acquireTimeout);
txConfiguration.setDefaultTxIsolation(TransactionIsolation.READ_COMMITTED);
txConfiguration.setDefaultTxConcurrency(TransactionConcurrency.PESSIMISTIC);
txConfiguration.setTxManagerFactory(new TransactionManagerFactory(txMgr));
this.clientConfig.setTransactionConfiguration(txConfiguration);
The Error says the transaction Manager itself passed to Factory is not serializable:
Caused by: java.io.NotSerializableException: org.infinispan.transaction.tm.EmbeddedBaseTransactionManager
However the Transaction Manager itself should not be serializable.
How can we pass existing Transaction Manager to ignite client?
BR
Yulian Oifa
question from:
https://stackoverflow.com/questions/66062372/apache-ignite-throws-failed-to-deserialize-object-with-given-class-loader-on-sta 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…