最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

osgi - How Do I Deploy Apache Camel 4.x Rest Servlet On Karaf 4.4.7 - Stack Overflow

programmeradmin0浏览0评论

I am trying to deploy an OSGi bundle that includes Camel 4.9 <rest> routes on to Apache Karaf 4.4.7. Part of the process includes registering the corresponding Camel CamelHttpTransportServlet with Karaf's OSGi HttpService. However, Camel's OsgiServletRegisterer no longer exists in Camel 4.x; therefore, this preclude me from registering CamelHttpTransportServlet.

This snippet of XML shows how the registration is done with Camel 3.x

  <reference id="httpService" interface=".osgi.service.http.HttpService" />
  <bean class=".apache.camelponent.servlet.osgi.OsgiServletRegisterer"
    init-method="register" destroy-method="unregister">
    <property name="alias" value="/avs" />
    <property name="httpService" ref="httpService" />
    <property name="servlet" ref="camelServlet" />
    <property name="servletName" value="camelServletAvsSvc" />
  </bean>
  <bean id="camelServlet" class=".apache.camelponent.servlet.CamelHttpTransportServlet" />

But in Camel 4.x, the OsgiServletRegisterer is no longer present. So how can I register CamelHttpTransportServlet with the OSGi HttpService on Karaf 4.4.7?

发布评论

评论列表(0)

  1. 暂无评论