[jbosscache-commits] JBoss Cache SVN: r5155 - pojo/branches/2.1/src/main/java/org/jboss/cache/pojo/jmx.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Jan 16 17:52:32 EST 2008


Author: jason.greene at jboss.com
Date: 2008-01-16 17:52:32 -0500 (Wed, 16 Jan 2008)
New Revision: 5155

Modified:
   pojo/branches/2.1/src/main/java/org/jboss/cache/pojo/jmx/PojoCacheJmxWrapper.java
Log:
Merge 5126


Modified: pojo/branches/2.1/src/main/java/org/jboss/cache/pojo/jmx/PojoCacheJmxWrapper.java
===================================================================
--- pojo/branches/2.1/src/main/java/org/jboss/cache/pojo/jmx/PojoCacheJmxWrapper.java	2008-01-16 22:51:48 UTC (rev 5154)
+++ pojo/branches/2.1/src/main/java/org/jboss/cache/pojo/jmx/PojoCacheJmxWrapper.java	2008-01-16 22:52:32 UTC (rev 5155)
@@ -936,17 +936,20 @@
     */
    private void sendStateChangeNotification(int oldState, int newState, String msg, Throwable t)
    {
-      long now = System.currentTimeMillis();
-
-      AttributeChangeNotification stateChangeNotification = new AttributeChangeNotification(
-              this,
-              plainCacheWrapper.getNextNotificationSequenceNumber(), now, msg,
-              "State", "java.lang.Integer",
-              new Integer(oldState), new Integer(newState)
-      );
-      stateChangeNotification.setUserData(t);
-
-      plainCacheWrapper.sendNotification(stateChangeNotification);
+      if (plainCacheWrapper != null)
+      {
+         long now = System.currentTimeMillis();
+   
+         AttributeChangeNotification stateChangeNotification = new AttributeChangeNotification(
+                 this,
+                 plainCacheWrapper.getNextNotificationSequenceNumber(), now, msg,
+                 "State", "java.lang.Integer",
+                 new Integer(oldState), new Integer(newState)
+         );
+         stateChangeNotification.setUserData(t);
+   
+         plainCacheWrapper.sendNotification(stateChangeNotification);
+      }
    }
 
    /**




More information about the jbosscache-commits mailing list