User: andreas
Date: 00/09/08 13:20:39
Modified: src/main/org/jboss/util MBeanProxy.java
ServiceMBeanSupport.java
Log:
Replace the old JMX jar files by the new final JMX classes
taken from JMX-RI and adjust all the classes to compile
and run smoothly.
Revision Changes Path
1.3 +2 -2 jboss/src/main/org/jboss/util/MBeanProxy.java
Index: MBeanProxy.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/util/MBeanProxy.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MBeanProxy.java 2000/05/12 10:17:28 1.2
+++ MBeanProxy.java 2000/09/08 20:20:39 1.3
@@ -22,7 +22,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class MBeanProxy
implements InvocationHandler
@@ -59,7 +59,7 @@
MBeanProxy(ObjectName name)
{
this.name = name;
- server = (MBeanServer)MBeanServer.findJMXAgent(null).iterator().next();
+ server = (MBeanServer)
MBeanServerFactory.findMBeanServer(null).iterator().next();
}
// Public --------------------------------------------------------
1.5 +11 -6 jboss/src/main/org/jboss/util/ServiceMBeanSupport.java
Index: ServiceMBeanSupport.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/util/ServiceMBeanSupport.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServiceMBeanSupport.java 2000/06/16 13:10:32 1.4
+++ ServiceMBeanSupport.java 2000/09/08 20:20:39 1.5
@@ -20,7 +20,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public abstract class ServiceMBeanSupport
extends NotificationBroadcasterSupport
@@ -81,7 +81,8 @@
return;
state = STARTING;
- sendNotification(new
AttributeChangeNotification(AttributeChangeNotification.ATTRIBUTE_CHANGE, this, id++,
new Date(), getName()+" starting", "State", "java.lang.Integer", new Integer(STOPPED),
new Integer(STARTING)));
+ //AS It seems that the first attribute is not needed anymore and use a long
instead of a Date
+ sendNotification(new AttributeChangeNotification(this, id++, new
Date().getTime(), getName()+" starting", "State", "java.lang.Integer", new
Integer(STOPPED), new Integer(STARTING)));
log.log("Starting");
log.setLog(log);
try
@@ -90,7 +91,8 @@
} catch (Exception e)
{
state = STOPPED;
- sendNotification(new
AttributeChangeNotification(AttributeChangeNotification.ATTRIBUTE_CHANGE, this, id++,
new Date(), getName()+" stopped", "State", "java.lang.Integer", new Integer(STARTING),
new Integer(STOPPED)));
+ //AS It seems that the first attribute is not needed anymore and use a
long instead of a Date
+ sendNotification(new AttributeChangeNotification(this, id++, new
Date().getTime(), getName()+" stopped", "State", "java.lang.Integer", new
Integer(STARTING), new Integer(STOPPED)));
log.error("Stopped");
log.exception(e);
throw e;
@@ -99,7 +101,8 @@
log.unsetLog();
}
state = STARTED;
- sendNotification(new
AttributeChangeNotification(AttributeChangeNotification.ATTRIBUTE_CHANGE, this, id++,
new Date(), getName()+" started", "State", "java.lang.Integer", new Integer(STARTING),
new Integer(STARTED)));
+ //AS It seems that the first attribute is not needed anymore and use a long
instead of a Date
+ sendNotification(new AttributeChangeNotification(this, id++, new
Date().getTime(), getName()+" started", "State", "java.lang.Integer", new
Integer(STARTING), new Integer(STARTED)));
log.log("Started");
}
@@ -109,7 +112,8 @@
return;
state = STOPPING;
- sendNotification(new
AttributeChangeNotification(AttributeChangeNotification.ATTRIBUTE_CHANGE, this, id++,
new Date(), getName()+" stopping", "State", "java.lang.Integer", new Integer(STARTED),
new Integer(STOPPING)));
+ //AS It seems that the first attribute is not needed anymore and use a long
instead of a Date
+ sendNotification(new AttributeChangeNotification(this, id++, new
Date().getTime(), getName()+" stopping", "State", "java.lang.Integer", new
Integer(STARTED), new Integer(STOPPING)));
log.log("Stopping");
log.setLog(log);
@@ -122,7 +126,8 @@
}
state = STOPPED;
- sendNotification(new
AttributeChangeNotification(AttributeChangeNotification.ATTRIBUTE_CHANGE, this, id++,
new Date(), getName()+" stopped", "State", "java.lang.Integer", new Integer(STOPPING),
new Integer(STOPPED)));
+ //AS It seems that the first attribute is not needed anymore and use a long
instead of a Date
+ sendNotification(new AttributeChangeNotification(this, id++, new
Date().getTime(), getName()+" stopped", "State", "java.lang.Integer", new
Integer(STOPPING), new Integer(STOPPED)));
log.log("Stopped");
log.unsetLog();
}