Author: jason.greene(a)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);
+ }
}
/**
Show replies by date