summaryrefslogtreecommitdiff
path: root/qpid/java/broker
diff options
context:
space:
mode:
authorBhupendra Bhusman Bhardwaj <bhupendrab@apache.org>2007-03-02 13:26:51 +0000
committerBhupendra Bhusman Bhardwaj <bhupendrab@apache.org>2007-03-02 13:26:51 +0000
commit409f1c667a0eb41ebaefb8c072565e23641152dd (patch)
tree5907116e8639897aaf3b18e8a08df08992170ef1 /qpid/java/broker
parent9478b7ff315c274603f1d85a9e48d44288750b3c (diff)
downloadqpid-python-409f1c667a0eb41ebaefb8c072565e23641152dd.tar.gz
QPID-390
Added test case for all the AMQQueue alerts git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/perftesting@513748 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
index 9657fcfcb3..b3c682c771 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
@@ -60,6 +60,8 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que
private final long[] _lastNotificationTimes = new long[NotificationCheck.values().length];
+ private Notification _lastNotification = null;
+
@MBeanConstructor("Creates an MBean exposing an AMQQueue")
public AMQQueueMBean(AMQQueue queue) throws JMException
{
@@ -227,11 +229,16 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que
{
// important : add log to the log file - monitoring tools may be looking for this
_logger.info(notification.name() + " On Queue " + queue.getName() + " - " + notificationMsg);
-
- Notification n = new Notification(MonitorNotification.THRESHOLD_VALUE_EXCEEDED, this,
+ notificationMsg = notification.name() + " " + notificationMsg;
+ _lastNotification = new Notification(MonitorNotification.THRESHOLD_VALUE_EXCEEDED, this,
++_notificationSequenceNumber, System.currentTimeMillis(), notificationMsg);
- _broadcaster.sendNotification(n);
+ _broadcaster.sendNotification(_lastNotification);
+ }
+
+ public Notification getLastNotification()
+ {
+ return _lastNotification;
}
/** @see org.apache.qpid.server.queue.AMQQueue#deleteMessageFromTop() */