2009/04/15 - Apache HiveMind has been retired.

For more information, please explore the Attic.

Jakarta > HiveMind
Font size:      

Monitor services

Though creation of jmx monitors is not automated a monitor can easily defining as service point using the standard BuilderFactory functionality. Such a monitor can watch the attribute of another MBean (for example the average execution time of a service method when using an Performance Interceptor and send notifications, if a treshold is crossed.

<service-point id="CalculatorSumMonitor" 
  <invoke-factory model="primitive" >
    <construct class="javax.management.monitor.GaugeMonitor" >
      <set property="granularityPeriod" value="1000" />
      <set property="observedObject" 
           id=Calculator,decorator=PerformanceCollector" />
      <set property="observedAttribute" 
        value="add(int) : Average Time" />