camel-karaf icon indicating copy to clipboard operation
camel-karaf copied to clipboard

Re-add OsgiServletRegisterer

Open jbonofre opened this issue 1 year ago • 5 comments

When camel-karaf upgraded to camel 4.x, OsgiServletRegisterer has been lost, mostly because it was not compliant with latest OSGi compendium spec (especially org.osgi.service.http.HttpService).

As camel-karaf 4.x supports Karaf 4.4.x (and 4.5.x soon), it makes sense to base on the Pax Web HttpService from this base.

I will re-add OsgiServletRegisterer in camel-karaf (probably in a dedicated bundle).

This will allow to support REST DSL in Blueprint (like this camel-karaf-examples/examples/camel-example-servlet-rest-blueprint/src/main/resources/OSGI-INF/blueprint/camel.xml at main · apache/camel-karaf-examples).

jbonofre avatar Dec 12 '24 14:12 jbonofre

Is there another way for me to expose my Camel route on Karaf 4.4.7 w/out having to rely on OsgiServletRegisterer? If so, would appreciate some pointers.

Thanks

joef-argo avatar Jan 31 '25 20:01 joef-argo

It's quite a showstopper to no longer have OsgiServletRegisterer available. Is it not possible to re-add it, even if later there is another solution? Right now I'm stuck and can't upgrade to newer Camel and Karaf versions.

lichtin avatar Jun 11 '25 15:06 lichtin

Hi, if it's a showstopper for you, it's an open-source project, so please don't hesitate to propose a pull request.

essobedo avatar Jun 11 '25 16:06 essobedo

Yes of course. However, what I am saying is that whoever decided to remove it should please reconsider this decision. Using open-source often means that one is at the mercy of a maintainer who can decide to remove code and functionality. Typically this is handled by offering a migration path (see Camel Migration docs), but here it seems this is not the case.

lichtin avatar Jun 11 '25 16:06 lichtin

Re https://github.com/apache/camel-karaf/pull/563 - It states user experience should be the same. Can someone please expand on this? How do I need to refactor my blueprint routes?

joef-argo avatar Jun 11 '25 20:06 joef-argo