You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by James Carman <ja...@carmanconsulting.com> on 2012/04/24 16:48:40 UTC
Registering Components in OSGi Using Spring XML File...
I am trying to set up a JMS component which connects to our WebSphere MQ
server. I want to be able to use this component in other bundles. I assume
I would need to get a ComponentResolver service set up. It looks like
camel-core sets itself up to look for other bundles to start up and it
automatically adds service definitions for ComponentResolvers. However, it
only looks for bundles containing the
META-INF/services/org/apache/camel/component/* resources. It there any way
to instruct Spring to register a ComponentResolver for my "wmq" component?
I think I have a pretty good idea of how to do this by rolling my own
support, but I thought I'd ask in case there's something "baked in" that I'm
missing (which I'm sure is the case). Thanks!
--
View this message in context: http://camel.465427.n5.nabble.com/Registering-Components-in-OSGi-Using-Spring-XML-File-tp5662252p5662252.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Registering Components in OSGi Using Spring XML File...
Posted by James Carman <ja...@carmanconsulting.com>.
I don't want to have to import it. I want to just use it throughout
ServiceMix just like I do all other components. I solved it by borrowing
some code from OsgiComponentResolver and tweaking it a bit to find
components in the spring context. I exported that guy as an OSGi service of
type ComponentResolver and with property component=wmq.
Thanks for the reply, though, Willem. Keep up the good work on these
forums. You guys are very responsive!
--
View this message in context: http://camel.465427.n5.nabble.com/Registering-Components-in-OSGi-Using-Spring-XML-File-tp5662252p5663793.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Registering Components in OSGi Using Spring XML File...
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
If you are using spring, you can export your wmq component as OSGi
service, then import it as a normal bean in the other bundle.
Camel will pick up the component for you automatically.
On Tue Apr 24 22:48:40 2012, James Carman wrote:
> I am trying to set up a JMS component which connects to our WebSphere MQ
> server. I want to be able to use this component in other bundles. I assume
> I would need to get a ComponentResolver service set up. It looks like
> camel-core sets itself up to look for other bundles to start up and it
> automatically adds service definitions for ComponentResolvers. However, it
> only looks for bundles containing the
> META-INF/services/org/apache/camel/component/* resources. It there any way
> to instruct Spring to register a ComponentResolver for my "wmq" component?
> I think I have a pretty good idea of how to do this by rolling my own
> support, but I thought I'd ask in case there's something "baked in" that I'm
> missing (which I'm sure is the case). Thanks!
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Registering-Components-in-OSGi-Using-Spring-XML-File-tp5662252p5662252.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang