Hi,
Now I can see the service in JBoss.
I had to change the plugin as follows
<metric name="LastAccessTime"
alias="LastAccessTime"
template="spring.application:type=MonitorFactory:LastAccessTime"
indicator="true"
units="none"
collectionType="dynamic"/>
<metric name="TotalCallTime"
alias="TotalCallTime"
template="spring.application:type=MonitorFactory:TotalCallTime"
indicator="true"
units="none"
collectionType="dynamic"/>
<metric name="CallsCount"
alias="CallsCount"
template="spring.application:type=MonitorFactory:CallsCount"
indicator="true"
units="none"
collectionType="dynamic"/>
Spring applicationContext.xml
<bean class="org.springframework.jmx.export.MBeanExporter">
<property name="autodetect" value="true" />
<property name="beans">
<util:map>
<entry key="spring.application:type=MonitorFactory,name=SpringApp" value-ref="monitorFactory"/>
</util:map>
</property>
<property name="assembler">
<bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
<property name="interfaceMappings">
<util:map>
<entry key="spring.application:type=MonitorFactory,name=SpringApp"
value="com.x.monitor.GlobalMonitorStatistics"/>
</util:map>
</property>
</bean>
</property>
</bean>
Now the problem I am currently facing is:
1) Its shows only 'Availability' metrics with message "There are no indicator metrics data to display for time period between ..".
2) LastAccessTime, TotalCallTime, CallsCount metrics are not shown at all.
Can anyone please let me know what I am missing.
I am also attaching the source code.
Any help will be greately appreciated.
Best Regards - Roy