You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Krzysztof Sobkowiak <kr...@gmail.com> on 2015/11/28 17:06:56 UTC
camel-bindy & OSGi
Hi
I have following route
<route id="order-service-normalizer-route">
<from uri="amq:incomingOrders"/>
<choice>
<when>
<simple>${header.CamelFileName} regex '^.*xml$'</simple>
<unmarshal>
<jaxb contextPath="org.sobkowiak.demos.order.common"/>
</unmarshal>
</when>
<when>
<simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
<unmarshal>
<bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
</unmarshal>
<convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
</when>
</choice>
<to uri="amq:orders"/>
</route>
I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
After changing to this form, it works for me
<dataFormats>
<bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
</dataFormats>
<route id="order-service-normalizer-route">
<from uri="amq:incomingOrders"/>
<choice>
<when>
<simple>${header.CamelFileName} regex '^.*xml$'</simple>
<unmarshal>
<jaxb contextPath="org.sobkowiak.demos.order.common"/>
</unmarshal>
</when>
<when>
<simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
<unmarshal ref="bindyDataFormat"/>S
<!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
</when>
</choice>
<to uri="amq:orders"/>
</route>
</camelContext>
I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
Regards
Krzysztof
--
Krzysztof Sobkowiak
JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
33rd Degree 4charity (http://2015.33degree.org/)
Re: camel-bindy & OSGi
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
The same works in rider-auto-osgi https://github.com/FuseByExample/rider-auto-osgi/blob/jboss-fuse-6.2.1/rider-auto-normalizer/src/main/resources/OSGI-INF/blueprint/camel-context.xml.
But there is a TypeConverter registered https://github.com/FuseByExample/rider-auto-osgi/blob/jboss-fuse-6.2.1/rider-auto-normalizer/src/main/resources/META-INF/services/org/apache/camel/TypeConverter.
Perhaps I'm missing this? But I have no idea what should be the content od TypeConverter in my case. I have no classes from org.fusesource.camel.util
On 28.11.2015 17:32, Krzysztof Sobkowiak wrote:
> But the option type should select the correct one
>
> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>
> The 3 data formats exist from a long time. Do you think, the <bindy> element will not work in OSGi?
>
>
> On 28.11.2015 17:26, Claus Ibsen wrote:
>> I guess its due bindy is essentially 3 data formats
>> https://github.com/apache/camel/blob/master/components/camel-bindy/pom.xml#L37
>>
>> But I guess we should just add bindy there as well.
>>
>>
>>
>> On Sat, Nov 28, 2015 at 5:23 PM, Krzysztof Sobkowiak
>> <kr...@gmail.com> wrote:
>>> 2.16.1
>>>
>>> On 28.11.2015 17:21, Claus Ibsen wrote:
>>>> What version of Camel are you using?
>>>>
>>>> On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
>>>> <kr...@gmail.com> wrote:
>>>>> Hi
>>>>>
>>>>> I have following route
>>>>>
>>>>> <route id="order-service-normalizer-route">
>>>>> <from uri="amq:incomingOrders"/>
>>>>> <choice>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>>> <unmarshal>
>>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>>> </unmarshal>
>>>>> </when>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>>> <unmarshal>
>>>>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>>> </unmarshal>
>>>>> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>>> </when>
>>>>> </choice>
>>>>> <to uri="amq:orders"/>
>>>>> </route>
>>>>>
>>>>>
>>>>> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>>>>>
>>>>> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>>>>>
>>>>> After changing to this form, it works for me
>>>>>
>>>>>
>>>>> <dataFormats>
>>>>> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>>> </dataFormats>
>>>>>
>>>>>
>>>>> <route id="order-service-normalizer-route">
>>>>> <from uri="amq:incomingOrders"/>
>>>>> <choice>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>>> <unmarshal>
>>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>>> </unmarshal>
>>>>> </when>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>>> <unmarshal ref="bindyDataFormat"/>S
>>>>> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>>> </when>
>>>>> </choice>
>>>>> <to uri="amq:orders"/>
>>>>> </route>
>>>>> </camelContext>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>>>>>
>>>>> Regards
>>>>> Krzysztof
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Krzysztof Sobkowiak
>>>>>
>>>>> JEE & OSS Architect, Integration Architect
>>>>> Apache Software Foundation Member (http://apache.org/)
>>>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>>>
>>>>>
>>>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>> --
>>> Krzysztof Sobkowiak
>>>
>>> JEE & OSS Architect, Integration Architect
>>> Apache Software Foundation Member (http://apache.org/)
>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>
>>>
>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>
--
Krzysztof Sobkowiak
JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
33rd Degree 4charity (http://2015.33degree.org/)
Re: camel-bindy & OSGi
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Hi JB
It worked. Thanks a lot :)
Regards
Krzysztof
On 28.11.2015 23:37, Jean-Baptiste Defard wrote:
> When i use Bindy in OSGI/Blueprint, i must declare:
>
> <reference id="bindy" interface="org.apache.camel.spi.DataFormatResolver" timeout="30000"/>
>
> if not declare this reference, my bundle stay in grace-period with Camel recent version.
>
>
> Le 28/11/2015 17:32, Krzysztof Sobkowiak a écrit :
>> But the option type should select the correct one
>>
>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>
>> The 3 data formats exist from a long time. Do you think, the <bindy> element will not work in OSGi?
>>
>>
>> On 28.11.2015 17:26, Claus Ibsen wrote:
>>> I guess its due bindy is essentially 3 data formats
>>> https://github.com/apache/camel/blob/master/components/camel-bindy/pom.xml#L37
>>>
>>> But I guess we should just add bindy there as well.
>>>
>>>
>>>
>>> On Sat, Nov 28, 2015 at 5:23 PM, Krzysztof Sobkowiak
>>> <kr...@gmail.com> wrote:
>>>> 2.16.1
>>>>
>>>> On 28.11.2015 17:21, Claus Ibsen wrote:
>>>>> What version of Camel are you using?
>>>>>
>>>>> On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
>>>>> <kr...@gmail.com> wrote:
>>>>>> Hi
>>>>>>
>>>>>> I have following route
>>>>>>
>>>>>> <route id="order-service-normalizer-route">
>>>>>> <from uri="amq:incomingOrders"/>
>>>>>> <choice>
>>>>>> <when>
>>>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>>>> <unmarshal>
>>>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>>>> </unmarshal>
>>>>>> </when>
>>>>>> <when>
>>>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>>>> <unmarshal>
>>>>>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>>>> </unmarshal>
>>>>>> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>>>> </when>
>>>>>> </choice>
>>>>>> <to uri="amq:orders"/>
>>>>>> </route>
>>>>>>
>>>>>>
>>>>>> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>>>>>>
>>>>>> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>>>>>>
>>>>>> After changing to this form, it works for me
>>>>>>
>>>>>>
>>>>>> <dataFormats>
>>>>>> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>>>> </dataFormats>
>>>>>>
>>>>>>
>>>>>> <route id="order-service-normalizer-route">
>>>>>> <from uri="amq:incomingOrders"/>
>>>>>> <choice>
>>>>>> <when>
>>>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>>>> <unmarshal>
>>>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>>>> </unmarshal>
>>>>>> </when>
>>>>>> <when>
>>>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>>>> <unmarshal ref="bindyDataFormat"/>S
>>>>>> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>>>> </when>
>>>>>> </choice>
>>>>>> <to uri="amq:orders"/>
>>>>>> </route>
>>>>>> </camelContext>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>>>>>>
>>>>>> Regards
>>>>>> Krzysztof
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Krzysztof Sobkowiak
>>>>>>
>>>>>> JEE & OSS Architect, Integration Architect
>>>>>> Apache Software Foundation Member (http://apache.org/)
>>>>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>>>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>>>>
>>>>>>
>>>>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>>> --
>>>> Krzysztof Sobkowiak
>>>>
>>>> JEE & OSS Architect, Integration Architect
>>>> Apache Software Foundation Member (http://apache.org/)
>>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>>
>>>>
>>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>>
>
--
Krzysztof Sobkowiak
JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
33rd Degree 4charity (http://2015.33degree.org/)
Re: camel-bindy & OSGi
Posted by Jean-Baptiste Defard <je...@netapsys.fr>.
When i use Bindy in OSGI/Blueprint, i must declare:
<reference id="bindy"
interface="org.apache.camel.spi.DataFormatResolver" timeout="30000"/>
if not declare this reference, my bundle stay in grace-period with Camel
recent version.
Le 28/11/2015 17:32, Krzysztof Sobkowiak a écrit :
> But the option type should select the correct one
>
> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>
> The 3 data formats exist from a long time. Do you think, the <bindy> element will not work in OSGi?
>
>
> On 28.11.2015 17:26, Claus Ibsen wrote:
>> I guess its due bindy is essentially 3 data formats
>> https://github.com/apache/camel/blob/master/components/camel-bindy/pom.xml#L37
>>
>> But I guess we should just add bindy there as well.
>>
>>
>>
>> On Sat, Nov 28, 2015 at 5:23 PM, Krzysztof Sobkowiak
>> <kr...@gmail.com> wrote:
>>> 2.16.1
>>>
>>> On 28.11.2015 17:21, Claus Ibsen wrote:
>>>> What version of Camel are you using?
>>>>
>>>> On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
>>>> <kr...@gmail.com> wrote:
>>>>> Hi
>>>>>
>>>>> I have following route
>>>>>
>>>>> <route id="order-service-normalizer-route">
>>>>> <from uri="amq:incomingOrders"/>
>>>>> <choice>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>>> <unmarshal>
>>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>>> </unmarshal>
>>>>> </when>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>>> <unmarshal>
>>>>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>>> </unmarshal>
>>>>> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>>> </when>
>>>>> </choice>
>>>>> <to uri="amq:orders"/>
>>>>> </route>
>>>>>
>>>>>
>>>>> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>>>>>
>>>>> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>>>>>
>>>>> After changing to this form, it works for me
>>>>>
>>>>>
>>>>> <dataFormats>
>>>>> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>>> </dataFormats>
>>>>>
>>>>>
>>>>> <route id="order-service-normalizer-route">
>>>>> <from uri="amq:incomingOrders"/>
>>>>> <choice>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>>> <unmarshal>
>>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>>> </unmarshal>
>>>>> </when>
>>>>> <when>
>>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>>> <unmarshal ref="bindyDataFormat"/>S
>>>>> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>>> </when>
>>>>> </choice>
>>>>> <to uri="amq:orders"/>
>>>>> </route>
>>>>> </camelContext>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>>>>>
>>>>> Regards
>>>>> Krzysztof
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Krzysztof Sobkowiak
>>>>>
>>>>> JEE & OSS Architect, Integration Architect
>>>>> Apache Software Foundation Member (http://apache.org/)
>>>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>>>
>>>>>
>>>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>> --
>>> Krzysztof Sobkowiak
>>>
>>> JEE & OSS Architect, Integration Architect
>>> Apache Software Foundation Member (http://apache.org/)
>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>
>>>
>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>
--
Jean-Baptiste Defard
Directeur Technique
Netapsys Conseil
124 - 126, rue de Provence
75008 Paris
Tél : +33 (0)1 70 64 27 42
Standard : +33 (0)1 70 64 27 33
Mob. : +33 (0)6 11 61 72 42
www.netapsys.fr <http://www.netapsys.fr> - blog.netapsys.fr
<http://blog.netapsys.fr>
Netapsys - Ingénierie informatique
Paris - Lyon - Nantes - Strasbourg - Lille - Rennes - Antananarivo
Re: camel-bindy & OSGi
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
But the option type should select the correct one
<bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
The 3 data formats exist from a long time. Do you think, the <bindy> element will not work in OSGi?
On 28.11.2015 17:26, Claus Ibsen wrote:
> I guess its due bindy is essentially 3 data formats
> https://github.com/apache/camel/blob/master/components/camel-bindy/pom.xml#L37
>
> But I guess we should just add bindy there as well.
>
>
>
> On Sat, Nov 28, 2015 at 5:23 PM, Krzysztof Sobkowiak
> <kr...@gmail.com> wrote:
>> 2.16.1
>>
>> On 28.11.2015 17:21, Claus Ibsen wrote:
>>> What version of Camel are you using?
>>>
>>> On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
>>> <kr...@gmail.com> wrote:
>>>> Hi
>>>>
>>>> I have following route
>>>>
>>>> <route id="order-service-normalizer-route">
>>>> <from uri="amq:incomingOrders"/>
>>>> <choice>
>>>> <when>
>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>> <unmarshal>
>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>> </unmarshal>
>>>> </when>
>>>> <when>
>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>> <unmarshal>
>>>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>> </unmarshal>
>>>> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>> </when>
>>>> </choice>
>>>> <to uri="amq:orders"/>
>>>> </route>
>>>>
>>>>
>>>> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>>>>
>>>> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>>>>
>>>> After changing to this form, it works for me
>>>>
>>>>
>>>> <dataFormats>
>>>> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>>> </dataFormats>
>>>>
>>>>
>>>> <route id="order-service-normalizer-route">
>>>> <from uri="amq:incomingOrders"/>
>>>> <choice>
>>>> <when>
>>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>>> <unmarshal>
>>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>>> </unmarshal>
>>>> </when>
>>>> <when>
>>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>>> <unmarshal ref="bindyDataFormat"/>S
>>>> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>>> </when>
>>>> </choice>
>>>> <to uri="amq:orders"/>
>>>> </route>
>>>> </camelContext>
>>>>
>>>>
>>>>
>>>>
>>>> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>>>>
>>>> Regards
>>>> Krzysztof
>>>>
>>>>
>>>>
>>>> --
>>>> Krzysztof Sobkowiak
>>>>
>>>> JEE & OSS Architect, Integration Architect
>>>> Apache Software Foundation Member (http://apache.org/)
>>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>>
>>>>
>>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>>
>> --
>> Krzysztof Sobkowiak
>>
>> JEE & OSS Architect, Integration Architect
>> Apache Software Foundation Member (http://apache.org/)
>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>
>>
>> 33rd Degree 4charity (http://2015.33degree.org/)
>
>
--
Krzysztof Sobkowiak
JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
33rd Degree 4charity (http://2015.33degree.org/)
Re: camel-bindy & OSGi
Posted by Claus Ibsen <cl...@gmail.com>.
I guess its due bindy is essentially 3 data formats
https://github.com/apache/camel/blob/master/components/camel-bindy/pom.xml#L37
But I guess we should just add bindy there as well.
On Sat, Nov 28, 2015 at 5:23 PM, Krzysztof Sobkowiak
<kr...@gmail.com> wrote:
> 2.16.1
>
> On 28.11.2015 17:21, Claus Ibsen wrote:
>> What version of Camel are you using?
>>
>> On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
>> <kr...@gmail.com> wrote:
>>> Hi
>>>
>>> I have following route
>>>
>>> <route id="order-service-normalizer-route">
>>> <from uri="amq:incomingOrders"/>
>>> <choice>
>>> <when>
>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>> <unmarshal>
>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>> </unmarshal>
>>> </when>
>>> <when>
>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>> <unmarshal>
>>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>> </unmarshal>
>>> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>> </when>
>>> </choice>
>>> <to uri="amq:orders"/>
>>> </route>
>>>
>>>
>>> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>>>
>>> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>>>
>>> After changing to this form, it works for me
>>>
>>>
>>> <dataFormats>
>>> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>>> </dataFormats>
>>>
>>>
>>> <route id="order-service-normalizer-route">
>>> <from uri="amq:incomingOrders"/>
>>> <choice>
>>> <when>
>>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>>> <unmarshal>
>>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>>> </unmarshal>
>>> </when>
>>> <when>
>>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>>> <unmarshal ref="bindyDataFormat"/>S
>>> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>>> </when>
>>> </choice>
>>> <to uri="amq:orders"/>
>>> </route>
>>> </camelContext>
>>>
>>>
>>>
>>>
>>> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>>>
>>> Regards
>>> Krzysztof
>>>
>>>
>>>
>>> --
>>> Krzysztof Sobkowiak
>>>
>>> JEE & OSS Architect, Integration Architect
>>> Apache Software Foundation Member (http://apache.org/)
>>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>>
>>>
>>> 33rd Degree 4charity (http://2015.33degree.org/)
>>
>>
>
> --
> Krzysztof Sobkowiak
>
> JEE & OSS Architect, Integration Architect
> Apache Software Foundation Member (http://apache.org/)
> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>
>
> 33rd Degree 4charity (http://2015.33degree.org/)
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Re: camel-bindy & OSGi
Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
2.16.1
On 28.11.2015 17:21, Claus Ibsen wrote:
> What version of Camel are you using?
>
> On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
> <kr...@gmail.com> wrote:
>> Hi
>>
>> I have following route
>>
>> <route id="order-service-normalizer-route">
>> <from uri="amq:incomingOrders"/>
>> <choice>
>> <when>
>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>> <unmarshal>
>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>> </unmarshal>
>> </when>
>> <when>
>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>> <unmarshal>
>> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>> </unmarshal>
>> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>> </when>
>> </choice>
>> <to uri="amq:orders"/>
>> </route>
>>
>>
>> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>>
>> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>>
>> After changing to this form, it works for me
>>
>>
>> <dataFormats>
>> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
>> </dataFormats>
>>
>>
>> <route id="order-service-normalizer-route">
>> <from uri="amq:incomingOrders"/>
>> <choice>
>> <when>
>> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
>> <unmarshal>
>> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
>> </unmarshal>
>> </when>
>> <when>
>> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
>> <unmarshal ref="bindyDataFormat"/>S
>> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
>> </when>
>> </choice>
>> <to uri="amq:orders"/>
>> </route>
>> </camelContext>
>>
>>
>>
>>
>> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>>
>> Regards
>> Krzysztof
>>
>>
>>
>> --
>> Krzysztof Sobkowiak
>>
>> JEE & OSS Architect, Integration Architect
>> Apache Software Foundation Member (http://apache.org/)
>> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
>> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>>
>>
>> 33rd Degree 4charity (http://2015.33degree.org/)
>
>
--
Krzysztof Sobkowiak
JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
33rd Degree 4charity (http://2015.33degree.org/)
Re: camel-bindy & OSGi
Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel are you using?
On Sat, Nov 28, 2015 at 5:06 PM, Krzysztof Sobkowiak
<kr...@gmail.com> wrote:
>
> Hi
>
> I have following route
>
> <route id="order-service-normalizer-route">
> <from uri="amq:incomingOrders"/>
> <choice>
> <when>
> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
> <unmarshal>
> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
> </unmarshal>
> </when>
> <when>
> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
> <unmarshal>
> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
> </unmarshal>
> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
> </when>
> </choice>
> <to uri="amq:orders"/>
> </route>
>
>
> I have installed camel-bindy feature under ServiceMix. While installing my bundle my bundle remains in GracePeriod status and I can see following log entry.
>
> 2015-11-28 16:58:57,480 | INFO | l for user karaf | BlueprintContainerImpl | 15 - org.apache.aries.blueprint.core - 1.4.4 | Bundle org.sobkowiak.demos.order-service-normalizer/1.0.0.SNAPSHOT is waiting for dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]
>
> After changing to this form, it works for me
>
>
> <dataFormats>
> <bindy id="bindyDataFormat" classType="org.sobkowiak.demos.order.common.Order" type="Csv"/>
> </dataFormats>
>
>
> <route id="order-service-normalizer-route">
> <from uri="amq:incomingOrders"/>
> <choice>
> <when>
> <simple>${header.CamelFileName} regex '^.*xml$'</simple>
> <unmarshal>
> <jaxb contextPath="org.sobkowiak.demos.order.common"/>
> </unmarshal>
> </when>
> <when>
> <simple>${header.CamelFileName} regex '^.*(csv|csl)$'</simple>
> <unmarshal ref="bindyDataFormat"/>S
> <!--<unmarshal> <bindy classType="org.sobkowiak.demos.order.common.Order" type="Csv"/> </unmarshal>--> <convertBodyTo type="org.sobkowiak.demos.order.common.Order"/>
> </when>
> </choice>
> <to uri="amq:orders"/>
> </route>
> </camelContext>
>
>
>
>
> I think the second route works because I define the binding data format in my blueprint file. In the first case not. Am I missing something?
>
> Regards
> Krzysztof
>
>
>
> --
> Krzysztof Sobkowiak
>
> JEE & OSS Architect, Integration Architect
> Apache Software Foundation Member (http://apache.org/)
> Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
> Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)
>
>
> 33rd Degree 4charity (http://2015.33degree.org/)
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2