Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/379.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在Spring上的ApacheCamel中一开始就并行运行两条路由?_Java_Spring_Apache Camel_Apache Servicemix - Fatal编程技术网

Java 如何在Spring上的ApacheCamel中一开始就并行运行两条路由?

Java 如何在Spring上的ApacheCamel中一开始就并行运行两条路由?,java,spring,apache-camel,apache-servicemix,Java,Spring,Apache Camel,Apache Servicemix,在这里,我配置了两条路由,当我作为守护进程启动ApacheServiceMix时运行。但当我启动servicemix时,我注意到每个路由都是按顺序执行的。我只是想知道如何在servicemix启动的同时运行它们 <camelContext xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="timer://myTimer?fixedRate=true&am

在这里,我配置了两条路由,当我作为守护进程启动ApacheServiceMix时运行。但当我启动servicemix时,我注意到每个路由都是按顺序执行的。我只是想知道如何在servicemix启动的同时运行它们

    <camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="timer://myTimer?fixedRate=true&amp;period=8000" />
        <to uri="bean://passengerUpdateDaemon?method=process"/>
    </route>
    <route>
        <from uri="timer://myTimer?fixedRate=true&amp;period=8000" />
        <to uri="bean://baggageUpdateDaemon?method=process"/>
    </route>
</camelContext>


请告诉我如何编写并行运行的代码

使用计时器名称的唯一名称,例如myTimer和myTimer2

使用计时器名称的唯一名称,例如myTimer和myTimer2

使用计时器名称的唯一名称,例如myTimer和myTimer2

使用计时器名称的唯一名称,例如myTimer和myTimer2