org.apache.james.postage.jmx
Class JVMResourceSamplerWorker

java.lang.Object
  extended by org.apache.james.postage.jmx.JVMResourceSamplerWorker
All Implemented Interfaces:
Sampler

public class JVMResourceSamplerWorker
extends java.lang.Object
implements Sampler

the peek into the James JVM is done using the build-in management (JMX) of J2SE 5 (and probably later) you must start James under a J2SE 5 compatible JVM and add some system properties to the phoenix.[sh|bat] file (all on one line):

JVM_OPTS="-Djava.ext.dirs=$JVM_EXT_DIRS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10201 "
this class does not even compile on Java versions before JSE 5.


Constructor Summary
JVMResourceSamplerWorker(java.lang.String host, int port, PostageRunnerResult results)
           
 
Method Summary
 void connectRemoteJamesJMXServer()
           
 void doSample()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JVMResourceSamplerWorker

public JVMResourceSamplerWorker(java.lang.String host,
                                int port,
                                PostageRunnerResult results)
Method Detail

connectRemoteJamesJMXServer

public void connectRemoteJamesJMXServer()
                                 throws SamplingException
Throws:
SamplingException

doSample

public void doSample()
              throws SamplingException
Specified by:
doSample in interface Sampler
Throws:
SamplingException


Copyright © 2006-2007 The Apache Software Foundation. All Rights Reserved.