简体   繁体   English

骆驼+保险丝中战争与osgi捆绑包之间的交叉通信

[英]Cross communication between war and osgi bundle in camel + fuse

How to communicate with war to bundle using direct-vm? 如何使用Direct-VM与War通信以捆绑? I have created a war file in which I have defined camel routes with unique camelContext. 我创建了一个战争文件,其中用唯一的camelContext定义了骆驼路线。 From this war I tried to connect with other bundle B which is purely OSGI bundle with unique camelcontext. 从这场战争中,我试图与其他捆绑软件B(纯粹是OSGI捆绑软件,具有唯一的camelcontext)连接。

When I tried to do direct-vm:route-abc from war, it is giving me error that there are consumer with direct-vm:route-abc. 当我尝试从战争中执行direct-vm:route-abc时,出现了直接使用vm:route-abc的使用者的错误消息。

Surprisingly I'm not able to see the war's camelContext when I do camel:context-list on karaf console. 令人惊讶的是,当我在karaf控制台上执行camel:context-list时,我看不到战争的camelContext。 It lists only osgi bundle context. 它仅列出osgi包上下文。

Can someone help here? 有人可以帮忙吗?

Thanks in advance. 提前致谢。

Ashish 阿希什

If you use a plain war file then camel does not assume it is running in OSGi. 如果您使用普通战争文件,那么骆驼不会假定它在OSGi中运行。 So the camel context is not announced as a service. 因此,不会将骆驼上下文宣布为服务。

You can instead use a plain bundle with blueprint and the camel servlet component to expose camel routes on the web. 您可以改为使用带有蓝图的纯捆绑包和骆驼Servlet组件在Web上公开骆驼路由。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM