use of org.mule.runtime.core.internal.processor.TryScope in project mule by mulesoft.
the class TryProcessorFactoryBeanTestCase method doesNotFailWithNoProcessors.
@Test
public void doesNotFailWithNoProcessors() throws Exception {
TryProcessorFactoryBean tryProcessorFactoryBean = new TryProcessorFactoryBean();
tryProcessorFactoryBean.setTransactionalAction(ACTION_INDIFFERENT_STRING);
tryProcessorFactoryBean.setTransactionType(LOCAL);
tryProcessorFactoryBean.setAnnotations(singletonMap(ROOT_CONTAINER_NAME_KEY, "root"));
registry.inject(tryProcessorFactoryBean);
TryScope tryMessageProcessor = (TryScope) tryProcessorFactoryBean.getObject();
initialiseIfNeeded(tryMessageProcessor, muleContextMock);
tryMessageProcessor.start();
}
use of org.mule.runtime.core.internal.processor.TryScope in project mule by mulesoft.
the class TryProcessorFactoryBean method getObject.
@Override
public Object getObject() throws Exception {
TryScope txProcessor = new TryScope();
txProcessor.setAnnotations(getAnnotations());
txProcessor.setExceptionListener(this.exceptionListener);
txProcessor.setTransactionConfig(createTransactionConfig(this.transactionalAction, this.transactionType));
txProcessor.setMessageProcessors(messageProcessors == null ? emptyList() : messageProcessors);
return txProcessor;
}