[
https://issues.apache.org/jira/browse/CAMEL-16564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337155#comment-17337155
]
Claus Ibsen commented on CAMEL-16564:
-------------------------------------
This is NOT missing.
If you look at camel-blueprint in an old 2.x version like this
https://github.com/apache/camel/blob/camel-2.17.x/components/camel-blueprint/src/main/resources/OSGI-INF/blueprint/camel-blueprint.xml
There is NO support for parsing spring XML files (eg <beans>) in
camel-blueprint. It has newer been. It was camel-spring-dm (via camel-spring)
that does that.
Spring DM is a dead project, and hence Spring XML on OSGi is dead. For XML
files with <beans> like dependency injections there is only OSGi blueprint that
is active project for OSGi / Karaf.
In camel-blueprint there is a /spring namespace in the source code because the
JAXB model classes in camel-core are historically defined with that namespace.
So in camel-blueprint the namespace handler must transpose /blueprint to
/spring to make it possible to marshal from XML into JAXB objects.
Camel does allow to load Camel only XML files (eg what you can define only
inside <routes> XML snippets). Those are Spring / Blueprint agnostic and can be
loaded from any runtime, also standalone etc.
So you are wrong when you say that /spring is missing in that XML file in the
top.
> Camel Blueprint Spring namespace handler not enabled
> ----------------------------------------------------
>
> Key: CAMEL-16564
> URL: https://issues.apache.org/jira/browse/CAMEL-16564
> Project: Camel
> Issue Type: Improvement
> Components: karaf, osgi
> Affects Versions: 3.9.0
> Reporter: Piotr Klimczak
> Priority: Major
>
> Camel Blueprint namespace handler is missing Spring Namespace declaration:
> {code:java}
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> <service interface="org.apache.aries.blueprint.NamespaceHandler">
> <service-properties>
> <entry key="osgi.service.blueprint.namespace">
> <array value-type="java.lang.String">
> <value>http://camel.apache.org/schema/spring</value> <!--
> THIS IS MISSING -->
> <value>http://camel.apache.org/schema/blueprint</value>
> <value>http://camel.apache.org/schema/placeholder</value>
> </array>
> </entry>
> </service-properties>
> <bean
> class="org.apache.camel.blueprint.handler.CamelNamespaceHandler"/>
> </service>
> </blueprint> {code}
> There is Support support implemented in Camel Blueprint project, there is
> even some test spring context, but no real test coverage for this.
> Is it because Apache Camel community is abandoning such approach?
> We have quite few integrations which we have to be able to run in both:
> Tomcat and Karaf.
> I can provide some patches and improvements, provided that the community is
> interested in supporting such path, rather then me spending time and nobody
> even accepting PRs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)