Hello Alasdair and Felix,
Sorry was out sick yesterday and hence the delayed reply.

Alasdair was right. I had to have the MBean Interface on the same package
level as the MBean impl, I totally forgot this one! My last assignment I
created at least 20 of them. Totally forgot and it was my bad.

Everything is working fine now.

Thanks
Matt



On Wed, Jan 4, 2012 at 12:57 AM, Felix Meschberger <[email protected]>wrote:

> Hi,
>
> Am 04.01.2012 um 00:47 schrieb Matt Madhavan:
>
> HI Alasdir and David,
> I followed your instructions and installed the JMX white board bundle.
>
> I have the following snippet:
>     <bean id="sendMsgServiceBean"
>           class="com.hcsc.ccsp.dupcheck.jms.tester.internal.SendMsg"
>                 init-method="init" destroy-method="destroy">
>     <property name = "connectionFactory" ref="connectionFactory"/>
>     </bean>
>
>      <service id = "sendMsgService"
>     ref="sendMsgServiceBean"
> interface="com.hcsc.ccsp.dupcheck.jms.tester.SendMsgMBean">
>  <service-properties>
> <*entry key="jmx.objectname*" value="domain:name=sendMessage" />
>  </service-properties>
>     </service>
>
>
> public interface SendMsg*MBean*{
> public void sendMsg();
> }
>
>
> public class SendMsg implements *SendMsgMBean*{
> ....
> }
>
>
> I'm getting the following error now:
>
> javax.management.NotCompliantMBeanException: MBean class
> com.hcsc.ccsp.dupcheck.jms.tester.internal.SendMsg does not implement
> DynamicMBean, neither follows the Standard MBean conventions
> (javax.management.NotCompliantMBeanException: Class
> com.hcsc.ccsp.dupcheck.jms.tester.internal.SendMsg is not a JMX compliant
> Standard MBean) nor the MXBean conventions
> (javax.management.NotCompliantMBeanException:
> com.hcsc.ccsp.dupcheck.jms.tester.internal.SendMsg: Class
> com.hcsc.ccsp.dupcheck.jms.tester.internal.SendMsg is not a JMX compliant
> MXBean)
>
>
> As Alasdair said, this might be caused by the MBean interface not being in
> the same package as the SendMsg class.
>
> You might want to try a trunk build of the JMX Whiteboard bundle:
>
> <dependency>
>   <groupId>org.apache.aries.jmx</groupId>
>   <artifactId>org.apache.aries.jmx.whiteboard</artifactId>
>   <version>0.3.1-SNAPSHOT</version>
> </dependency>
>
> This provides support to register MBeans whose interface is not in the
> same package.
>
> Regards
> Felix
>
>
> Any ideas please?
>
> Thanks
> Matt
>
> On Tue, Jan 3, 2012 at 3:14 AM, Alasdair Nottingham <[email protected]>wrote:
>
>> Hi,
>>
>> The bundle you need for the JMX Whiteboard is:
>> http://www.apache.org/dyn/closer.cgi/aries/org.apache.aries.jmx.whiteboard-0.3.jar
>>
>> It is available in maven at
>> mvn:org.apache.aries.jmx/org.apache.aries.jmx.whiteboard/0.3
>>
>> If you want this bundle available in Karaf then you need to be contacting
>> the karaf user list rather than our one (its email is
>> [email protected]).
>>
>> I hope this helps you get your JMX MBean registered.
>>
>> One final thing I expect the reason that the Derby and Camel MBeans are
>> registered is because they use the Java SDK APIs to register the MBeans
>> directly rather than using the JMX Whiteboard model as you are. This is a
>> valid thing to do if not quite OSGi natural, which is why the JMX
>> Whiteboard bundle Felix created exists, to solve exactly this software
>> problem.
>>
>> Thanks
>> Alasdair
>>
>> On 3 January 2012 05:08, Matt Madhavan <[email protected]> wrote:
>>
>>> Hi Felix,
>>> Happy New Year and thanks for the reply. If you could let me know the
>>> set of bundles I need to deploy would be great.
>>>
>>> All the bundles like Derby, Camel etc, I can see them instrumented and
>>> can see them in JConsole. I know JMX and that's the easy part, but all the
>>> promises of todayland?
>>>
>>> How about user bundles, like the one I deployed, can't be rocket
>>> sience!(sic I almost became one) but simple steps and docs?
>>>
>>> Man I'm getting stumped on one of the basic concept of
>>> BluePrint-extender bundles. JMX is an old tech, let's not make a simple
>>> tech complex in BluePrint. We r software guys who r supposed to provide
>>> solutions, its not abt tech, its about the problem we need to solve
>>>
>>> Any help will be appreciated, and will come back to the open source many
>>> times from me. Rt now, need to figure out simple steps to solve s/w
>>> problems.
>>> On Jan 1, 2012 12:01 PM, "Felix Meschberger" <[email protected]> wrote:
>>>
>>>>  Hi
>>>> IIRC the JMX whiteboard is a separate bundle
>>>> Regards
>>>> Felix
>>>>
>>>> Matt Madhavan <[email protected]> wrote:
>>>>
>>>>
>>>> Hello,
>>>> I'm trying to instrument one of my Blueprint bean as follows:
>>>>
>>>>  package com.hcsc.ccsp.dupcheck.jms.tester;
>>>>
>>>>  public interface SendMsgService*MBea*n {
>>>> public void sendMsg();
>>>> }
>>>>
>>>>  public class AMQSendMsgService implements SendMsgServiceMBean{
>>>> .....
>>>> }
>>>>
>>>>      <bean id="amqSendMsgServiceBean"
>>>>
>>>> class="com.hcsc.ccsp.dupcheck.jms.tester.internal.AMQSendMsgService"
>>>>                init-method="init" destroy-method="destroy">
>>>>     <property name = "connectionFactory" ref="connectionFactory"/>
>>>>     </bean>
>>>>      <service id = "amqSendMsgService"
>>>>     ref="amqSendMsgServiceBean"
>>>> interface="com.hcsc.ccsp.dupcheck.jms.tester.SendMsgServiceMBean">
>>>> <service-properties>
>>>> <entry key="jmx.objectname" value="domain:name=sendMessage" />
>>>> </service-properties>
>>>>     </service>
>>>>
>>>>  I have deployed this in Karaf (Felix). I see that Karaf has Aries JMX
>>>> and JMX Blueprint bundes.
>>>>
>>>>  In JConsole I not see my instrumented bean.
>>>>
>>>>  Any ideas please? Am I missing some bundles?
>>>>
>>>>  Thanks in advance!
>>>>
>>>>  Matt
>>>>
>>>
>>
>>
>> --
>> Alasdair Nottingham
>> [email protected]
>>
>
>
>

Reply via email to