Search in sources :

Example 1 with SpringXmlConfigurationBuilder

use of org.mule.runtime.config.internal.SpringXmlConfigurationBuilder in project mule by mulesoft.

the class SpringArtifactConfigurationProcessor method createArtifactContext.

@Override
public ArtifactContext createArtifactContext(ArtifactContextConfiguration artifactContextConfiguration) throws ConfigurationException {
    SpringXmlConfigurationBuilder springXmlConfigurationBuilder = new SpringXmlConfigurationBuilder(artifactContextConfiguration.getConfigResources(), artifactContextConfiguration.getArtifactDeclaration(), artifactContextConfiguration.getArtifactProperties(), artifactContextConfiguration.getArtifactType(), artifactContextConfiguration.isEnableLazyInitialization(), artifactContextConfiguration.isDisableXmlValidations());
    artifactContextConfiguration.getParentContext().ifPresent(parentMuleContext -> springXmlConfigurationBuilder.setParentContext(parentMuleContext));
    artifactContextConfiguration.getServiceConfigurators().stream().forEach(springXmlConfigurationBuilder::addServiceConfigurator);
    springXmlConfigurationBuilder.configure(artifactContextConfiguration.getMuleContext());
    return springXmlConfigurationBuilder.createArtifactContext();
}
Also used : SpringXmlConfigurationBuilder(org.mule.runtime.config.internal.SpringXmlConfigurationBuilder)

Example 2 with SpringXmlConfigurationBuilder

use of org.mule.runtime.config.internal.SpringXmlConfigurationBuilder in project mule by mulesoft.

the class OptionalObjectsIgnoredTestCase method before.

@Before
public void before() throws Exception {
    muleContext = (MuleContextWithRegistries) new DefaultMuleContextFactory().createMuleContext(testServicesConfigurationBuilder, new SpringXmlConfigurationBuilder(new String[0], emptyMap()));
    muleContext.start();
    muleContext.getRegistry().lookupByType(Calendar.class);
}
Also used : DefaultMuleContextFactory(org.mule.runtime.core.api.context.DefaultMuleContextFactory) SpringXmlConfigurationBuilder(org.mule.runtime.config.internal.SpringXmlConfigurationBuilder) Before(org.junit.Before)

Aggregations

SpringXmlConfigurationBuilder (org.mule.runtime.config.internal.SpringXmlConfigurationBuilder)2 Before (org.junit.Before)1 DefaultMuleContextFactory (org.mule.runtime.core.api.context.DefaultMuleContextFactory)1