Mail Archive Home | fractal-commits List | Febuary 2007 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Wednesday, February 7, 2007 @ 19:33:52
Author: rivierni
Path: /cvsroot/fractal/fractaljmx/src/org/objectweb/fractal/jmx/agent
Modified: Agent.java
------------+
Agent.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
Index: fractaljmx/src/org/objectweb/fractal/jmx/agent/Agent.java
diff -u fractaljmx/src/org/objectweb/fractal/jmx/agent/Agent.java:1.8
fractaljmx/src/org/objectweb/fractal/jmx/agent/Agent.java:1.9
--- fractaljmx/src/org/objectweb/fractal/jmx/agent/Agent.java:1.8 Mon
Aug 21 12:36:31 2006
+++ fractaljmx/src/org/objectweb/fractal/jmx/agent/Agent.java Wed Feb 7
19:33:52 2007
@@ -44,12 +44,25 @@
import javax.management.modelmbean.InvalidTargetObjectTypeException;
import javax.management.monitor.MonitorNotification;
+import java.lang.management.ManagementFactory;
+
import java.util.*;
/**
* A component representing the JMX agent level.
- * This component encapsulates a JMX {@link javax.management.MBeanServer
MBeanServer} and
- * allows MBean manipulation by implementing the {@link Admin} interface for
registering MBeans,
+ *
+ * <p>This component encapsulates a JMX {@link javax.management.MBeanServer
MBeanServer}.
+ * Specifically, since version 0.2, it encapsulates the PlatformMBeanServer
which allows remote connexion (e.g. with JConsole)
+ * as explained in the j2se documentation.
+ * For example, the following command line arguments start the jvm with a
JMX remote agent enabled, with no
+ * authentication or ssl security and with a JMX connector listening on port
1234:
+ * <UL>
+ * <LI> -Dcom.sun.management.jmxremote.authenticate=false
+ * <LI> -Dcom.sun.management.jmxremote.ssl=false
+ * <LI> -Dcom.sun.management.jmxremote.port=1234
+ * </UL>
+ *
+ * This component allows MBean manipulation by implementing the {@link
Admin} interface for registering MBeans,
* and the {@link AdminAttributes} interface for filtering MBeans.
* Where the MBeans represent component server interfaces or JMX
* {@link javax.management.monitor.MonitorMBean monitors} for observing
component attributes.
@@ -78,10 +91,11 @@
* monitors only, since they handle several integer or floating-point
attribute types).
* </UL>
*
- * @version 0.1
+ * @version 0.2
*/
public class Agent implements BindingController, LifeCycleController,
AdminAttributes, Admin {
- private MBeanServer _server =
MBeanServerFactory.newMBeanServer("Fractal");
+ //private MBeanServer _server =
MBeanServerFactory.newMBeanServer("Fractal");
+ private MBeanServer _server =
ManagementFactory.getPlatformMBeanServer();
private int _depth = -1;
private String _itfPatterns = "*:*";
private String _stringMonitors = "";
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.