Search in sources :

Example 1 with TryScope

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();
}
Also used : TryScope(org.mule.runtime.core.internal.processor.TryScope) Test(org.junit.Test)

Example 2 with TryScope

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;
}
Also used : TryScope(org.mule.runtime.core.internal.processor.TryScope)

Aggregations

TryScope (org.mule.runtime.core.internal.processor.TryScope)2 Test (org.junit.Test)1