-
15. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 9, 2011 9:59 AM (in response to ffang)It certainly looks like a bundle level issue, but I also wonder why it works (or at least seems to work) with osgi:reference and Java code, if they "block" until the component is available.
-
16. Re: "No component found" Issue in 4.3.0-fuse-03-00
ffang Jan 9, 2011 8:26 PM (in response to davsclaus)Hi Claus,
Per the async nature of OSGi, it's not a good practice that we explicitly sepcify the bundles start sequence. Also from the OSGi core runtime perspective, camel bundles are also user bundles.
And hold a OSGi service reference(as I showed to the user) of the bundle which you want start before your bundle IMHO is a general way to resolve that issue.
Regards
Freeman
-
17. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 9, 2011 11:32 PM (in response to ffang)How does that reference makes it work, for my information?
-
18. Re: "No component found" Issue in 4.3.0-fuse-03-00
ffang Jan 10, 2011 12:33 AM (in response to fribeiro_webmaster)Hi,
Using a osgi:reference in your customer bunlde do the tricky.
It can guarantee that the osgi service exposed by camel-restlet is available(which also means camel-restlet bundle get started) before spring-dm(or blueprint) try to init your customer bundle.
Freeman
-
19. Re: "No component found" Issue in 4.3.0-fuse-03-00
davsclaus Jan 10, 2011 1:37 AM (in response to ffang)Freeman we are talking about Fuse ESB as the container, which should known that Camel is a framework that comes out of the box, and that Camel is used for end users to build applications. So Camel bundles should be considered part of the infrastructure and IMHO have starting priority over any user application.
In the vanilla Apache Karaf / Felix / Equionox container, yeah then its another matter. But again we are talking about Fuse ESB. It should be dead easy for end users!
-
20. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 10, 2011 9:48 AM (in response to ffang)Nice, thank you very much for the clarification!
I can also understand already why it works with Java code, with Spring beans created for each component, but won't resort to that.
I definitely agree with Claus that requiring all components to be added as OSGi references makes it too complicated to use Camel, and that the ESB should somehow ensure all components are initialized before routes.
Edited by: fribeiro on Jan 10, 2011 2:48 PM
-
21. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 10, 2011 10:15 AM (in response to ffang)I've posted about it at http://fernandoribeiro.eti.br/2011/01/10/component-discovery-issues-in-progress-fuse-4-2/
-
22. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 10, 2011 10:35 AM (in response to ffang)Humm.. what about type converters, how can I ensure they are initialized on time?
Edited by: fribeiro on Jan 10, 2011 3:34 PM
-
23. Re: "No component found" Issue in 4.3.0-fuse-03-00
njiang Jan 10, 2011 7:59 PM (in response to fribeiro_webmaster)There is an OSGi component resolver will try to publish the component as an OSGi service. If the component camel-restlet OSGi service is published, it means camel is already find that component, and the component bundler is started rightly. Then the spring DM will start the camel context after that.
Changing the bundle start level is another solution for this issue.
Willem
-
24. Re: "No component found" Issue in 4.3.0-fuse-03-00
ffang Jan 10, 2011 8:05 PM (in response to fribeiro_webmaster)FYI, we're discussing on Servicemix Dev mailling list about the issue that we should put camel related bundles(might also other infrastructure bundles) lower start level, which means it will get started before end user's bundle.
Freeman
-
25. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 10, 2011 8:23 PM (in response to ffang)Thanks for the head-up, just took a look at the thread and will follow until the change is completed.
Does anybody know if there a similar workaround for type converters? I'm now worried that, even though we now ensure the component is started successfully, the type converter may not be so and the bundle won't start right.
-
26. Re: "No component found" Issue in 4.3.0-fuse-03-00
njiang Jan 10, 2011 8:35 PM (in response to fribeiro_webmaster)As you know, OSGi bundle can be install and uninstall at the runtime, so Camel OSGi TypeConveter is using a service tracker to monitor the bundle states.
Current camel doesn't name the type converter as it does for the camel-compnent.
So it's really hard to know if the TypeConverter is ready for using unless you know the bundle which has the converter that you want to used is started rightly.
Willem
-
27. Re: "No component found" Issue in 4.3.0-fuse-03-00
ffang Jan 10, 2011 8:46 PM (in response to fribeiro_webmaster)Hi,
I'm not a camel expert, but I believe each type converter also exposed as OSGi service,
So in your customer bundle, you can import a converter osgi:reference, similarly as you import a camel component reference in your bundle.
Freeman
-
28. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 10, 2011 8:46 PM (in response to njiang)So we're safe with the type converter in camel-restlet (great!), as it is bundled with the component and is started along with it.
As a matter of fact, I think we are safe with all type converters in the system bundles, as I don't recall any of them being packaged separately.
-
29. Re: "No component found" Issue in 4.3.0-fuse-03-00
fribeiro_webmaster Jan 10, 2011 8:48 PM (in response to ffang)Willem just clarified that, even though they are not registered like the components are, we're safe as long as they're packaged along with components referred to in osgi:reference entries.