本文整理汇总了Java中org.mule.config.spring.SpringXmlConfigurationBuilder类的典型用法代码示例。如果您正苦于以下问题:Java SpringXmlConfigurationBuilder类的具体用法?Java SpringXmlConfigurationBuilder怎么用?Java SpringXmlConfigurationBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SpringXmlConfigurationBuilder类属于org.mule.config.spring包,在下文中一共展示了SpringXmlConfigurationBuilder类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startMuleContext
import org.mule.config.spring.SpringXmlConfigurationBuilder; //导入依赖的package包/类
private void startMuleContext(ApplicationContext parent) {
if (muleContext == null) {
DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
try {
SpringXmlConfigurationBuilder configBuilder = new SpringXmlConfigurationBuilder(config);
StaticApplicationContext staticApplicationContext = new StaticApplicationContext(parent);
staticApplicationContext.refresh();
configBuilder.setParentContext(staticApplicationContext);
muleContext = muleContextFactory.createMuleContext(configBuilder);
muleContext.start();
} catch (MuleException e) {
throw new RuntimeException(e);
}
}
}
示例2: main
import org.mule.config.spring.SpringXmlConfigurationBuilder; //导入依赖的package包/类
public static void main(String[] args) throws MuleException
{
setProperty("ebms.mode",new String[]{"normal","oracle"},"normal");
setProperty("ebms.protocol",new String[]{"http","https"},"http");
setProperty("ebms.database",new String[]{"hsqldb","mysql","postgresql","mssql","oracle"},"hsqldb");
DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
SpringXmlConfigurationBuilder configBuilder = new SpringXmlConfigurationBuilder(args.length == 0 ? "main.xml" : args[0]);
MuleContext muleContext = muleContextFactory.createMuleContext(configBuilder);
muleContext.start();
}
示例3: contextInitialized
import org.mule.config.spring.SpringXmlConfigurationBuilder; //导入依赖的package包/类
@Override
public void contextInitialized(ServletContextEvent event) {
DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
try {
logger.info("Starting Mule...");
String[] flows = new String[] { "wundershop.xml", "fakeshopsystem.xml" };
SpringXmlConfigurationBuilder configBuilder = new SpringXmlConfigurationBuilder(flows);
muleContext = muleContextFactory.createMuleContext(configBuilder);
muleContext.start();
logger.info("Mule started");
} catch (MuleException e) {
throw new RuntimeException(e);
}
}