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.