You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "saravanan.t" <sa...@hotmail.com> on 2009/05/29 05:26:59 UTC
SMX4: POJO in servicemix-bean as OSGI bundle
Hi,
I have set of POJOs doing message exchanges using servicemix-bean, for which
I am trying to package as OSGI bundles (using maven-bundle plugin). Here is
what I have:
1) Pojo1
2) resources/xbeans.xml
When I do mvn:install I get a bundle jar which seem ok from Bnd tool interms
of Import/Export. It also gets deployed ok in smx4, as I can see the bundle
status as actibe. But the spring app status seem empty and there is no
endpoint!
However when I create a SU + SA packaging I do see an endpoint.
When I tried putting it under META-INF/spring folder, i do see deployment
error:
...xbean.xml] is invalid; nested exception is org.xml.sax.SAXParseException:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration
can be found for element 'bean:endpoint'.
So I guess my question is: Can I only package it as SU +SA?
Thanks a have a nice day!
--
View this message in context: http://www.nabble.com/SMX4%3A-POJO-in-servicemix-bean-as-OSGI-bundle-tp23773725p23773725.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: SMX4: POJO in servicemix-bean as OSGI bundle
Posted by Gert Vanthienen <ge...@gmail.com>.
Saravanan Thandapani,
I just added a page to our wiki that briefly describes how to do this.
Could you take a look at
http://cwiki.apache.org/confluence/display/SMX4/Creating+an+OSGi+bundle+for+deploying+JBI+endpoints
to see if that helps you solve you problem?
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
2009/5/29 saravanan.t <sa...@hotmail.com>:
>
> Hi,
>
> That does work indeed, thanks to you!
>
> Any clue what resources I need to import in the beans configuration for a
> servicemix-bean component?
>
> Pls not pom has been updated to include dependency on servicemix-bean
> bundle.
>
> Thanks!
>
>
>
> Freeman Fang wrote:
>>
>> Hi,
>> First of all you can use both JBI style package (SU + SA as you
>> mentioned) and osgi bundle package.
>> My other comment inline
>>
>>
>> saravanan.t wrote:
>>>
>>> Hi,
>>>
>>> I have set of POJOs doing message exchanges using servicemix-bean, for
>>> which I am trying to package as OSGI bundles (using maven-bundle plugin).
>>> Here is what I have:
>>>
>>> 1) Pojo1
>>> 2) resources/xbeans.xml
>>>
>>> When I do mvn:install I get a bundle jar which seem ok from Bnd tool
>>> interms of Import/Export. It also gets deployed ok in smx4, as I can see
>>> the bundle status as actibe. But the spring app status seem empty and
>>> there is no endpoint!
>>> Since you didn't put your xbeans.xml to
>>> ./src/main/resources/META-INF/spring/ so it wasn't considered as
>>> spring-dm enabled bundle, so the spring status is empty
>>> you should put your xbeans.xml to ./src/main/resources/META-INF/spring/
>>> folder
>>>>
>>>
>>>
>>> However when I create a SU + SA packaging I do see an endpoint.
>>>
>>> When I tried putting it under META-INF/spring folder, i do see deployment
>>> error:
>>>
>>> ...xbean.xml] is invalid; nested exception is
>>> org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
>>> wildcard is strict, but no declaration can be found for element
>>> 'bean:endpoint'.
>>> This time your xbeans.xml get loaded, but I think the error comes from
>>> that in the pom.xml of your bundle, the mvn-bundle-plugin didn't import
>>> the necessary package like org.apache.servicemix.bean
>>> I have a bundle at hand, which package cxf bc consumer as osgi bundle, I
>>> believe this is very similar as your scenario, so you may need take a
>>> look(as the attachment) and get some rough idea
>>> Also I realize that we didn't have an example to demonstrate how to
>>> package smx 3.x JBI endpoint as osgi bundle, we may need add one.
>>> http://www.nabble.com/file/p23774502/jbi-osgi-ws-frontend.tar
>>> jbi-osgi-ws-frontend.tar
>>>
>>> So I guess my question is: Can I only package it as SU +SA?
>>>
>>> Thanks a have a nice day!
>>>
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/SMX4%3A-POJO-in-servicemix-bean-as-OSGI-bundle-tp23773725p23776377.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
Re: SMX4: POJO in servicemix-bean as OSGI bundle
Posted by "saravanan.t" <sa...@hotmail.com>.
Hi,
That does work indeed, thanks to you!
Any clue what resources I need to import in the beans configuration for a
servicemix-bean component?
Pls not pom has been updated to include dependency on servicemix-bean
bundle.
Thanks!
Freeman Fang wrote:
>
> Hi,
> First of all you can use both JBI style package (SU + SA as you
> mentioned) and osgi bundle package.
> My other comment inline
>
>
> saravanan.t wrote:
>>
>> Hi,
>>
>> I have set of POJOs doing message exchanges using servicemix-bean, for
>> which I am trying to package as OSGI bundles (using maven-bundle plugin).
>> Here is what I have:
>>
>> 1) Pojo1
>> 2) resources/xbeans.xml
>>
>> When I do mvn:install I get a bundle jar which seem ok from Bnd tool
>> interms of Import/Export. It also gets deployed ok in smx4, as I can see
>> the bundle status as actibe. But the spring app status seem empty and
>> there is no endpoint!
>> Since you didn't put your xbeans.xml to
>> ./src/main/resources/META-INF/spring/ so it wasn't considered as
>> spring-dm enabled bundle, so the spring status is empty
>> you should put your xbeans.xml to ./src/main/resources/META-INF/spring/
>> folder
>>>
>>
>>
>> However when I create a SU + SA packaging I do see an endpoint.
>>
>> When I tried putting it under META-INF/spring folder, i do see deployment
>> error:
>>
>> ...xbean.xml] is invalid; nested exception is
>> org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
>> wildcard is strict, but no declaration can be found for element
>> 'bean:endpoint'.
>> This time your xbeans.xml get loaded, but I think the error comes from
>> that in the pom.xml of your bundle, the mvn-bundle-plugin didn't import
>> the necessary package like org.apache.servicemix.bean
>> I have a bundle at hand, which package cxf bc consumer as osgi bundle, I
>> believe this is very similar as your scenario, so you may need take a
>> look(as the attachment) and get some rough idea
>> Also I realize that we didn't have an example to demonstrate how to
>> package smx 3.x JBI endpoint as osgi bundle, we may need add one.
>> http://www.nabble.com/file/p23774502/jbi-osgi-ws-frontend.tar
>> jbi-osgi-ws-frontend.tar
>>
>> So I guess my question is: Can I only package it as SU +SA?
>>
>> Thanks a have a nice day!
>>
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/SMX4%3A-POJO-in-servicemix-bean-as-OSGI-bundle-tp23773725p23776377.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: SMX4: POJO in servicemix-bean as OSGI bundle
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
First of all you can use both JBI style package (SU + SA as you mentioned)
and osgi bundle package.
My other comment inline
saravanan.t wrote:
>
> Hi,
>
> I have set of POJOs doing message exchanges using servicemix-bean, for
> which I am trying to package as OSGI bundles (using maven-bundle plugin).
> Here is what I have:
>
> 1) Pojo1
> 2) resources/xbeans.xml
>
> When I do mvn:install I get a bundle jar which seem ok from Bnd tool
> interms of Import/Export. It also gets deployed ok in smx4, as I can see
> the bundle status as actibe. But the spring app status seem empty and
> there is no endpoint!
> Since you didn't put your xbeans.xml to
> ./src/main/resources/META-INF/spring/ so it wasn't considered as spring-dm
> enabled bundle, so the spring status is empty
> you should put your xbeans.xml to ./src/main/resources/META-INF/spring/
> folder
>>
>
>
> However when I create a SU + SA packaging I do see an endpoint.
>
> When I tried putting it under META-INF/spring folder, i do see deployment
> error:
>
> ...xbean.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
> wildcard is strict, but no declaration can be found for element
> 'bean:endpoint'.
> This time your xbeans.xml get loaded, but I think the error comes from
> that in the pom.xml of your bundle, the mvn-bundle-plugin didn't import
> the necessary package like org.apache.servicemix.bean
> I have a bundle at hand, which package cxf bc consumer as osgi bundle, I
> believe this is very similar as your scenario, so you may need take a
> look(as the attachment) and get some rough idea
> Also I realize that we didn't have an example to demonstrate how to
> package smx 3.x JBI endpoint as osgi bundle, we may need add one.
> http://www.nabble.com/file/p23774502/jbi-osgi-ws-frontend.tar
> jbi-osgi-ws-frontend.tar
>
> So I guess my question is: Can I only package it as SU +SA?
>
> Thanks a have a nice day!
>
>
>
>
--
View this message in context: http://www.nabble.com/SMX4%3A-POJO-in-servicemix-bean-as-OSGI-bundle-tp23773725p23774502.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.