• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DefaultMuleContextFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.mule.context.DefaultMuleContextFactory的典型用法代码示例。如果您正苦于以下问题:Java DefaultMuleContextFactory类的具体用法?Java DefaultMuleContextFactory怎么用?Java DefaultMuleContextFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DefaultMuleContextFactory类属于org.mule.context包,在下文中一共展示了DefaultMuleContextFactory类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: startMuleContext

import org.mule.context.DefaultMuleContextFactory; //导入依赖的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);
		}			
	}
}
 
开发者ID:denschu,项目名称:mule-spring-boot-starter,代码行数:17,代码来源:MuleContextInitializer.java


示例2: main

import org.mule.context.DefaultMuleContextFactory; //导入依赖的package包/类
/**
 * @param args
 */
public static void main(String[] args) throws Exception{
	MuleContext muleContext = new DefaultMuleContextFactory().createMuleContext("consumeservice.xml"); 
	muleContext.start();
	MuleClient client=new MuleClient();
	client.send("vm://helloworld.queue", "BlueDavy", null);
}
 
开发者ID:java-scott,项目名称:java-project,代码行数:10,代码来源:ConsumeService.java


示例3: main

import org.mule.context.DefaultMuleContextFactory; //导入依赖的package包/类
/**
 * @param args
 */
public static void main(String[] args) throws Exception{
	MuleContext muleContext = new DefaultMuleContextFactory().createMuleContext("publishservice.xml"); 
	muleContext.start();
	System.out.println("Server Started");
	Object object=new Object();
	synchronized (object) {
		object.wait();
	}
}
 
开发者ID:java-scott,项目名称:java-project,代码行数:13,代码来源:PublishService.java


示例4: testMule

import org.mule.context.DefaultMuleContextFactory; //导入依赖的package包/类
@Test
public void testMule() throws Exception {
    MuleContext muleContext = new DefaultMuleContextFactory().createMuleContext("mule/mule-standlone-config.xml");
    muleContext.start();
    MuleClient muleClient = new DefaultLocalMuleClient(muleContext);
    Integer days = 5;
    MuleMessage message = muleClient.send("vm://helloMule", new DefaultMuleMessage(days, muleContext));
    assertNotNull(message.getPayload());
    Boolean result = (Boolean) message.getPayload();
    assertTrue(result);
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:12,代码来源:HelloMuleTest.java


示例5: testMuleMaster

import org.mule.context.DefaultMuleContextFactory; //导入依赖的package包/类
@Test
public void testMuleMaster() throws Exception {
    MuleContext muleContext = new DefaultMuleContextFactory().createMuleContext("mule/mule-master/mule-master.xml");
    muleContext.start();

    MuleRegistry registry = muleContext.getRegistry();
    RepositoryService repositoryService = (RepositoryService) registry.get("repositoryService");
    repositoryService.createDeployment().addClasspathResource("mule/leaveWithMule.bpmn").deploy();

    MuleClient muleClient = new DefaultLocalMuleClient(muleContext);
    DefaultMuleMessage message = new DefaultMuleMessage("", muleContext);
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("days", 5);
    variableMap.put("processDefinitionKey", "leaveWithMule");
    message.setProperty("createProcessParameters", variableMap , PropertyScope.OUTBOUND);
    MuleMessage responseMessage = muleClient.send("vm://startLeaveProcess", message);
    ProcessInstance processInstance = (ProcessInstance) responseMessage.getPayload();
    assertFalse(processInstance.isEnded());

    TaskService taskService = registry.get("taskService");
    Task task = taskService.createTaskQuery().singleResult();
    assertNotNull(task);
    assertEquals("部门经理审批", task.getName());

    muleContext.stop();
    muleContext.dispose();
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:28,代码来源:ActivitiWithMuleTest.java


示例6: main

import org.mule.context.DefaultMuleContextFactory; //导入依赖的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();
}
 
开发者ID:mprins,项目名称:muleebmsadapter,代码行数:11,代码来源:Start.java


示例7: contextInitialized

import org.mule.context.DefaultMuleContextFactory; //导入依赖的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);
  }
}
 
开发者ID:berndruecker,项目名称:mule-camunda-24,代码行数:15,代码来源:MuleStarter.java


示例8: setUpContext

import org.mule.context.DefaultMuleContextFactory; //导入依赖的package包/类
@Before
public void setUpContext() throws Exception {
    muleContext = new DefaultMuleContextFactory().createMuleContext();
}
 
开发者ID:greenbird,项目名称:mule-access-log,代码行数:5,代码来源:AccessLogConverterTestBase.java



注:本文中的org.mule.context.DefaultMuleContextFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java S04PacketEntityEquipment类代码示例发布时间:2022-05-23
下一篇:
Java ActionManagerEx类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap