[jboss-cvs] JBossCache/src/org/jboss/cache/jmx ...
Brian Stansberry
brian.stansberry at jboss.com
Thu May 10 13:30:52 EDT 2007
User: bstansberry
Date: 07/05/10 13:30:52
Modified: src/org/jboss/cache/jmx CacheNotificationListener.java
CacheJmxWrapper.java
Log:
[JBCACHE-855] Inform CacheListener of our ObjectName
Revision Changes Path
1.2 +2 -2 JBossCache/src/org/jboss/cache/jmx/CacheNotificationListener.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheNotificationListener.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheNotificationListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- CacheNotificationListener.java 10 May 2007 04:00:23 -0000 1.1
+++ CacheNotificationListener.java 10 May 2007 17:30:52 -0000 1.2
@@ -38,7 +38,7 @@
* events.
*
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
class CacheNotificationListener implements CacheListener
{
@@ -109,14 +109,14 @@
public void cacheStarted(CacheSPI cache)
{
Notification n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STARTED, broadcaster, seq(), MSG_CACHE_STARTED);
- n.setUserData(cache.getConfiguration().getServiceName());
+ n.setUserData(serviceName);
broadcaster.sendNotification(n);
}
public void cacheStopped(CacheSPI cache)
{
Notification n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STOPPED, broadcaster, seq(), MSG_CACHE_STOPPED);
- n.setUserData(cache.getConfiguration().getServiceName());
+ n.setUserData(serviceName);
broadcaster.sendNotification(n);
}
1.17 +6 -2 JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapper.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheJmxWrapper.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapper.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- CacheJmxWrapper.java 10 May 2007 04:00:23 -0000 1.16
+++ CacheJmxWrapper.java 10 May 2007 17:30:52 -0000 1.17
@@ -225,7 +225,11 @@
}
}
- return new ObjectName(cacheObjectName);
+ ObjectName result = new ObjectName(cacheObjectName);
+ // Inform our CacheNotificationListener of our ObjectName
+ cacheNotificationListener.setServiceName(result.getCanonicalName());
+
+ return result;
}
/**
More information about the jboss-cvs-commits
mailing list