Hi,
just to share my progress... I didn't realize InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanInfoAssembler. This bean has capabilities to define the notifications that are going to be thrown by the MBeans through the properties notificationInfos and notificationInfoMappings (that are poorly documented, same that the bean itself, but it is still a RC, I hope they will be a bit more documented in the final release).
Example:
Code:
<bean id="interfaceBasedAssembler" class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
<property name="managedInterfaces">
<value>es.indra.ibuilder.jmx.mbeans.BaseMBean,es.indra.ibuilder.jmx.mbeans.MonitorizableMBean,es.indra.ibuilder.jmx.mbeans.SLAbleMBean</value>
</property>
<property name="notificationInfoMappings">
<map>
<entry key="pruebadozer3:type=service,service=es.indra.pruebadozer.servicios.SrvPruebaImpl,name=es.indra.pruebadozer.servicios.SrvPruebaImpl" value-ref="SLANotification"/>
<entry key="pruebadozer3:type=service,subtype=operation,service=es.indra.pruebadozer.servicios.SrvPruebaImpl,name=getPrueba" value-ref="SLANotification"/>
<entry key="pruebadozer3:type=service,subtype=operation,service=es.indra.pruebadozer.servicios.SrvPruebaImpl,name=setPrueba" value-ref="SLANotification"/>
</map>
</property>
</bean>
With this configuration, the method getNotificationInfo returns the notification's information to construct the ModelMBean but...
- With the MC4J console the notifications are shown in the tree but I'm not able to listen them because an exception arise (maybe a MC4J problem).
- With JConsole the notifications tab is not available (and it was when I exposed directly as an MBean implementing NotificationEmitter).
- AdvenNet AppManager says that the MBean don't send notifications.
- Similar with JManage...
So I think the MBean still is not informing correctly that it can send notifications... ¿any idea?
Thanks in advance,
Jose Luis.