Thanks Christian. I'll try do it and I send message with result. Best regards,
2016-07-01 3:46 GMT-03:00 cschneider [via CXF] < [email protected]>: > It should work like this: > > List<Bus> busList; > and its setter... > > In blueprint you need this: > > <reference-list id="busList"member-type="service-object" > interface="org.apache.cxf.Bus"/> > > Christian > > On 01.07.2016 08:35, Leandro Andrade wrote: > > > Thanks Christian. I'll try do it using blueprint. Do you have some > > reference where I learn how I can do it? > > > > Thanks again. I lost many time with this. > > > > Regards, > > > > Leandro Andrade > > Em 1 de jul de 2016 03:20, "cschneider [via CXF]" < > > [hidden email] <http:///user/SendEmail.jtp?type=node&node=5769890&i=0>> > escreveu: > > > >> In OSGi CXF uses one bus per bundle. So it will not work to just use > the > >> thread default bus which is quite unsafe to use anyway. > >> > >> So the correct way is to bind to all services with the Bus interface > and > >> go > >> through all of them. The preferred way to do this is with DS or > blueprint > >> as it is quite easy to do it wrong with the plain OSGi APIs. I just > looked > >> into the CXF command source and found that retrieving the services is > done > >> incorrectly there. > >> > >> Christian > >> > >> > >> 2016-06-30 18:12 GMT+02:00 Leandro Andrade <[hidden email] > >> <http:///user/SendEmail.jtp?type=node&node=5769888&i=0>>: > >> > >>> Hi, > >>> > >>> I'm implementing in Karaf 3.0.6 a bundle. In this bundle I'm trying > get > >>> info > >>> about all CXF services registered in my Karaf. > >>> > >>> Using the karaf console it's simple: > >>> $cxf:list-endpoints > >>> > >>> But I want do it using Java code. I implementation of cxf-commands I > saw > >>> the > >>> method .getServers(), but it need a instance of Bus. I tired: > >>> > >>> Bus bus = CXFBusFactory.getThreadDefaultBus(); > >>> ServerRegistry serverRegistry = > bus.getExtension(ServerRegistry.class); > >>> List<Server> servers = serverRegistry.getServers(); > >>> > >>> However I received the error: > >>> > >>> java.lang.IllegalAccessError: tried to access class > >>> org.apache.cxf.BusFactory$BusHolder from class > org.apache.cxf.BusFactory > >>> at > >>> org.apache.cxf.BusFactory.getThreadBusHolder(BusFactory.java:124) > >>> at > >>> org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:225) > >>> at > >>> org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:214) > >>> at > >>> > >>> > >> > br.ufba.dcc.wiser.smartufba.mqttfuseki.MqttCxfController.<init>(MqttCxfController.java:40) > > >> > >>> at > >>> > >> > br.ufba.dcc.wiser.smartufba.mqttfuseki.Activator$1.run(Activator.java:31) > >>> at java.lang.Thread.run(Thread.java:745) > >>> > >>> Somebody can help me with this? > >>> > >>> Thanks a lot > >>> > >>> Regards, > >>> > >>> > >>> Leandro Andrade > >>> > >>> > >>> > >>> > >>> > >>> > >>> -- > >>> View this message in context: > >>> > >> > http://cxf.547215.n5.nabble.com/Doubt-in-implementation-of-get-all-CXF-services-in-a-karaf-bundle-tp5769879.html > >>> Sent from the cxf-user mailing list archive at Nabble.com. > >>> > >> > >> > >> -- > >> -- > >> Christian Schneider > >> http://www.liquid-reality.de > >> < > >> > https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de> > > >> > >> > >> Open Source Architect > >> http://www.talend.com > >> < > >> > https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com> > > >> > >> > >> > >> ------------------------------ > >> If you reply to this email, your message will be added to the > discussion > >> below: > >> > >> > http://cxf.547215.n5.nabble.com/Doubt-in-implementation-of-get-all-CXF-services-in-a-karaf-bundle-tp5769879p5769888.html > >> To start a new topic under cxf-user, email > >> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5769890&i=1> > >> To unsubscribe from cxf-user, click here > >> < > >> . > >> NAML > >> < > http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > >> > > > > > > > > -- > > View this message in context: > http://cxf.547215.n5.nabble.com/Doubt-in-implementation-of-get-all-CXF-services-in-a-karaf-bundle-tp5769879p5769889.html > > Sent from the cxf-user mailing list archive at Nabble.com. > > > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > http://www.talend.com > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://cxf.547215.n5.nabble.com/Doubt-in-implementation-of-get-all-CXF-services-in-a-karaf-bundle-tp5769879p5769890.html > To start a new topic under cxf-user, email > [email protected] > To unsubscribe from cxf-user, click here > <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=547216&code=bGVvanNhbmRyYWRlQGdtYWlsLmNvbXw1NDcyMTZ8LTk0Nzk5OTkwMQ==> > . > NAML > <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- Leandro Andrade http://www.leandroandrade.net -- View this message in context: http://cxf.547215.n5.nabble.com/Doubt-in-implementation-of-get-all-CXF-services-in-a-karaf-bundle-tp5769879p5769901.html Sent from the cxf-user mailing list archive at Nabble.com.
