use of org.mule.runtime.api.tx.TransactionType in project mule by mulesoft.
the class ExtensionMessageSource method buildTransactionConfig.
private TransactionConfig buildTransactionConfig() {
MuleTransactionConfig transactionConfig = new MuleTransactionConfig();
transactionConfig.setAction(toActionCode(sourceAdapter.getTransactionalAction()));
transactionConfig.setMuleContext(muleContext);
TransactionType transactionalType = sourceAdapter.getTransactionalType();
transactionConfig.setFactory(transactionFactoryLocator.lookUpTransactionFactory(transactionalType).orElseThrow(() -> new IllegalStateException(format("Unable to create Source with Transactions of Type: [%s]. No factory available for this transaction type", transactionalType))));
return transactionConfig;
}
Aggregations