dev@glassfish.java.net

Registering stats provider object

From: Lee Chuk Munn <chuk-munn.lee_at_oracle.com>
Date: Thu, 13 Jan 2011 17:32:18 +0800

Hi

I have some problem registering my stats provider object. I got the
following 2 error messages in the log file. Any hints why GF could not
create xmpp-container config element in <monitoring-service>?

[#|2011-01-13T17:23:40.893+0800|WARNING|glassfish3.0.1|javax.enterprise.system.tools.monitor.org.glassfish.admin.monitor|_ThreadID=25;_ThreadName=Thread-1;|MNTG0207:module-monitoring-level
or container-monitoring config element for xmpp-container does not exist|#]

[#|2011-01-13T17:23:40.893+0800|WARNING|glassfish3.0.1|javax.enterprise.system.tools.monitor.org.glassfish.admin.monitor|_ThreadID=25;_ThreadName=Thread-1;|MNTG0201:Flashlight
listener registration failed for listener class :
com.kenai.jabberwocky.xmppcontainer.stats.IncomingPacketListener , will
retry later |#]

I register the listeners

inListener = new IncomingPacketListener();
StatsProviderManager.register("xmpp-container",
PluginPoint.APPLICATIONS, "container/incoming", inListener);

and IncomingPacketListener

@ManagedObject
public class IncomingPacketListener {
   private CountStatisticImpl presenceCounter =
      new CounterStatisticImpl("PresencePacketCounter", "count", "...");

   @ManagedAttribute(id="incomingpresencepacketcounter")
   public CounterStatistic getIncomingPresencePacketCounter() {
      return (presenceCounter);
   }

Thanks

Regards

-- 
I would love to change the world, but they won't give me the source code