You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by sekaijin <jy...@yahoo.fr> on 2016/05/10 08:17:51 UTC

Hawto declare MBean using Blueprint on karaf 3.0.X ?

Hi,

I use karaf 2.2.2 and I migrates to karaf 3.0.6 (ServiceMix 6.1.1)
I have a bundle that contains an implementation of MBean that is used by
many other bundles

To declare a Mbean in one of these bundles, I imports the package containing
the implementation and blueprint I use the following code:


But it does not work with karaf 3
The doc said karaf 3 uses Aries JMX.
the Aries JMX doc i, the blueprint section simply mentions "TODO"

I dont find a doc on this topic.
I saw some examples which uses annotaions on the implementation.
But this is not possible since I have an implementation shared by many
bundles.



--
View this message in context: http://karaf.922171.n3.nabble.com/Hawto-declare-MBean-using-Blueprint-on-karaf-3-0-X-tp4046559.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Hawto declare MBean using Blueprint on karaf 3.0.X ?

Posted by sekaijin <jy...@yahoo.fr>.
Merci
thank
;)



--
View this message in context: http://karaf.922171.n3.nabble.com/Hawto-declare-MBean-using-Blueprint-on-karaf-3-0-X-tp4046559p4046572.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Hawto declare MBean using Blueprint on karaf 3.0.X ?

Posted by Łukasz Dywicki <lu...@code-house.org>.
Dear sekaijin,
You are right - 2.3.x and earlier versions of Karaf internally used org.apache.karaf.management.MBeanRegistrer for all JMX related stuff. This class was visible to everyone and could be referenced from user bundles.

Starting from 3.x Karaf switched to aries-jmx and uses whiteboard pattern to register mbeans. It is much more handy cause you do not need to wait for MBeanServer reference in your configuration and eventual failure of MBean registration will not block your bundle from starting up.

Best regards,
Lukasz
--
Apache Karaf Committer & PMC
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org

> Wiadomość napisana przez sekaijin <jy...@yahoo.fr> w dniu 10 maj 2016, o godz. 13:38:
> 
> I'm not sure this is the right solution.
> I was inspired by:
> karaf/jms/src/main/resources/OSGI-INF/blueprint/jms-core.xml
> 
> it works.
> A+JYT
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Hawto-declare-MBean-using-Blueprint-on-karaf-3-0-X-tp4046559p4046560.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Hawto declare MBean using Blueprint on karaf 3.0.X ?

Posted by sekaijin <jy...@yahoo.fr>.
I'm not sure this is the right solution.
I was inspired by:
karaf/jms/src/main/resources/OSGI-INF/blueprint/jms-core.xml

it works.
A+JYT



--
View this message in context: http://karaf.922171.n3.nabble.com/Hawto-declare-MBean-using-Blueprint-on-karaf-3-0-X-tp4046559p4046560.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.