You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by cr...@apache.org on 2002/01/19 07:23:24 UTC
cvs commit: jakarta-commons-sandbox/modeler/src/test/org/apache/commons/modeler/demo Demo.java
craigmcc 02/01/18 22:23:24
Modified: modeler/src/test/org/apache/commons/modeler/demo Demo.java
Log:
Remove references to the Trace and HtmlAdaptorServer classes (which are
specific to the JMX RI implementation) from the test and demo classes.
Revision Changes Path
1.2 +3 -43 jakarta-commons-sandbox/modeler/src/test/org/apache/commons/modeler/demo/Demo.java
Index: Demo.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/test/org/apache/commons/modeler/demo/Demo.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Demo.java 1 Oct 2001 17:39:51 -0000 1.1
+++ Demo.java 19 Jan 2002 06:23:24 -0000 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/test/org/apache/commons/modeler/demo/Demo.java,v 1.1 2001/10/01 17:39:51 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2001/10/01 17:39:51 $
+ * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/test/org/apache/commons/modeler/demo/Demo.java,v 1.2 2002/01/19 06:23:24 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2002/01/19 06:23:24 $
*
* ====================================================================
*
@@ -86,9 +86,6 @@
import org.apache.commons.modeler.ManagedBean;
import org.apache.commons.modeler.Registry;
-import com.sun.management.jmx.Trace;
-import com.sun.jdmk.comm.HtmlAdaptorServer;
-
/**
* <p>Demonstration program for the Modeller package. Instantiates a set
@@ -96,7 +93,7 @@
* manipulates the objects through the MBean interfaces.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2001/10/01 17:39:51 $
+ * @version $Revision: 1.2 $ $Date: 2002/01/19 06:23:24 $
*/
public class Demo implements NotificationListener {
@@ -127,24 +124,12 @@
/**
- * The HtmlAdaptorServer to be executed.
- */
- private static HtmlAdaptorServer adaptor = null;
-
-
- /**
* The attribute notification listener.
*/
private static Demo demo = null;
/**
- * The port number on which to create our HtmlAdaptorServer.
- */
- private static int port = 8888;
-
-
- /**
* The configuration information registry for our managed beans.
*/
private static Registry registry = null;
@@ -179,7 +164,6 @@
listMBeans();
dumpServer();
updateServer();
- // createAdaptor();
}
@@ -188,26 +172,6 @@
/**
- * Create the HTML Adaptor to respond to management requests.
- */
- private static void createAdaptor() {
-
- System.out.println("Creating HtmlAdaptorServer on port " +
- port + " ...");
- try {
- adaptor = new HtmlAdaptorServer(port);
- ObjectName name = new ObjectName("Adaptor:name=html,port=" + port);
- server.registerMBean(adaptor, name);
- adaptor.start();
- } catch (Throwable t) {
- t.printStackTrace(System.out);
- System.exit(1);
- }
-
- }
-
-
- /**
* Create the MBeans that correspond to every node of our tree.
*/
private static void createMBeans() {
@@ -399,7 +363,6 @@
System.out.println("Creating MBeanServer ...");
try {
// System.setProperty("LEVEL_TRACE", "true");
- Trace.parseTraceProperties();
server = MBeanServerFactory.createMBeanServer();
} catch (Throwable t) {
t.printStackTrace(System.out);
@@ -534,9 +497,6 @@
System.out.println("===========================================");
System.out.println("Test updating Server properties ...");
-
- // System.setProperty("LEVEL_TRACE", "true");
- Trace.parseTraceProperties();
System.out.println(" Retrieving current value of 'port'");
Integer ivalue = (Integer) server.getAttribute(name, "port");
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>