Search in sources :

Example 6 with MessagingExceptionResolver

use of org.mule.runtime.core.internal.util.MessagingExceptionResolver in project mule by mulesoft.

the class ExtensionMessageSource method createSource.

private synchronized void createSource() throws Exception {
    if (sourceAdapter == null) {
        CoreEvent initialiserEvent = null;
        try {
            initialiserEvent = getInitialiserEvent(muleContext);
            sourceAdapter = sourceAdapterFactory.createAdapter(getConfiguration(initialiserEvent), createSourceCallbackFactory(), this, sourceConnectionManager, new MessagingExceptionResolver(this));
            muleContext.getInjector().inject(sourceAdapter);
        } finally {
            if (initialiserEvent != null) {
                ((BaseEventContext) initialiserEvent.getContext()).success();
            }
        }
    }
}
Also used : BaseEventContext(org.mule.runtime.core.privileged.event.BaseEventContext) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) MessagingExceptionResolver(org.mule.runtime.core.internal.util.MessagingExceptionResolver)

Aggregations

MessagingExceptionResolver (org.mule.runtime.core.internal.util.MessagingExceptionResolver)6 MessagingException (org.mule.runtime.core.internal.exception.MessagingException)4 CoreEvent (org.mule.runtime.core.api.event.CoreEvent)3 InitialisationException (org.mule.runtime.api.lifecycle.InitialisationException)2 ErrorType (org.mule.runtime.api.message.ErrorType)2 PrivilegedMuleContext (org.mule.runtime.core.privileged.PrivilegedMuleContext)2 Collection (java.util.Collection)1 Map (java.util.Map)1 Optional (java.util.Optional)1 CompletableFuture (java.util.concurrent.CompletableFuture)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1 Test (org.junit.Test)1 AbstractComponent (org.mule.runtime.api.component.AbstractComponent)1 ComponentLocation (org.mule.runtime.api.component.location.ComponentLocation)1 ConfigurationComponentLocator (org.mule.runtime.api.component.location.ConfigurationComponentLocator)1 ConnectionException (org.mule.runtime.api.connection.ConnectionException)1 DefaultMuleException (org.mule.runtime.api.exception.DefaultMuleException)1 ErrorTypeRepository (org.mule.runtime.api.exception.ErrorTypeRepository)1 MuleException (org.mule.runtime.api.exception.MuleException)1