From 7cc8461698809c7623a9dab68bf4a72e0e1e04c4 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 3 Jun 2009 03:12:03 +0000 Subject: This is a fix for QPID-1888 The SelectorTest contains a test case to catch this as the JMS tck does not have one. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@781244 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/filter/PropertyExpression.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'qpid/java/client/src/main') diff --git a/qpid/java/client/src/main/java/org/apache/qpid/filter/PropertyExpression.java b/qpid/java/client/src/main/java/org/apache/qpid/filter/PropertyExpression.java index 2c05f5ce0f..09152f7f1b 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/filter/PropertyExpression.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/filter/PropertyExpression.java @@ -204,6 +204,24 @@ public class PropertyExpression implements Expression } } }); + + JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new Expression() + { + public Object evaluate(AbstractJMSMessage message) + { + try + { + return message.getJMSMessageID(); + } + catch (Exception e) + { + _logger.warn("Error evaluating property",e); + + return null; + } + + } + }); } -- cgit v1.2.1