com.atomikos.icatch.jta.template.NotSupportedTemplate Maven / Gradle / Ivy
/**
* Copyright (C) 2000-2019 Atomikos
*
* LICENSE CONDITIONS
*
* See http://www.atomikos.com/Main/WhichLicenseApplies for details.
*/
package com.atomikos.icatch.jta.template;
import java.util.concurrent.Callable;
import javax.transaction.TransactionManager;
class NotSupportedTemplate extends TransactionTemplate {
public NotSupportedTemplate(TransactionManager utm, int timeout) {
super(utm, timeout);
}
public T execute(Callable work) throws Exception {
T ret = null;
try {
suspendExistingTransaction();
ret = work.call();
} finally {
resumeExistingTransaction();
}
return ret;
}
}