本文整理汇总了Java中org.mule.api.MuleContext.start方法的典型用法代码示例。如果您正苦于以下问题:Java MuleContext.start方法的具体用法?Java MuleContext.start怎么用?Java MuleContext.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mule.api.MuleContext
的用法示例。
在下文中一共展示了MuleContext.start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSpringMaster
import org.mule.api.MuleContext; //导入方法依赖的package包/类
@Test
public void testSpringMaster() throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("mule/spring-master/spring-master.xml");
MuleContext mc = (MuleContext) ctx.getBean("_muleContext");
mc.start();
RepositoryService repositoryService = (RepositoryService) ctx.getBean("repositoryService");
repositoryService.createDeployment().addClasspathResource("mule/leaveWithMule.bpmn").deploy();
RuntimeService runtimeService = (RuntimeService) ctx.getBean("runtimeService");
Map<String, Object> variableMap = new HashMap<String, Object>();
variableMap.put("days", 5);
runtimeService.startProcessInstanceByKey("leaveWithMule", variableMap);
TaskService taskService = (TaskService) ctx.getBean("taskService");
Task task = taskService.createTaskQuery().singleResult();
assertNotNull(task);
assertEquals("部门经理审批", task.getName());
mc.stop();
}
示例2: main
import org.mule.api.MuleContext; //导入方法依赖的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);
}
示例3: main
import org.mule.api.MuleContext; //导入方法依赖的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();
}
}
示例4: testMule
import org.mule.api.MuleContext; //导入方法依赖的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);
}
示例5: testMuleMaster
import org.mule.api.MuleContext; //导入方法依赖的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();
}
示例6: main
import org.mule.api.MuleContext; //导入方法依赖的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();
}