activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r754973 - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java activemq-web-console/pom.xml activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java
Date Mon, 16 Mar 2009 18:22:41 GMT
Author: gtully
Date: Mon Mar 16 18:22:41 2009
New Revision: 754973

URL: http://svn.apache.org/viewvc?rev=754973&view=rev
Log:
apply patch from https://issues.apache.org/activemq/browse/AMQ-2154, with thanks

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
    activemq/trunk/activemq-web-console/pom.xml
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java?rev=754973&r1=754972&r2=754973&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
Mon Mar 16 18:22:41 2009
@@ -176,9 +176,10 @@
                 try {
                     object = (Serializable)objIn.readObject();
                 } catch (ClassNotFoundException ce) {
-                    throw new IOException(ce.getMessage());
+                    throw JMSExceptionSupport.create("Failed to build body from content.
Serializable class not available to broker. Reason: " + ce, ce);
+                } finally {
+                    dataIn.close();
                 }
-                dataIn.close();
             } catch (IOException e) {
                 throw JMSExceptionSupport.create("Failed to build body from bytes. Reason:
" + e, e);
             }

Modified: activemq/trunk/activemq-web-console/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/pom.xml?rev=754973&r1=754972&r2=754973&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/pom.xml (original)
+++ activemq/trunk/activemq-web-console/pom.xml Mon Mar 16 18:22:41 2009
@@ -181,7 +181,12 @@
       <artifactId>jetty-util</artifactId>
       <scope>test</scope>
     </dependency>
-
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-2.1</artifactId>
+      <scope>provided</scope>
+    </dependency> 
+ 
     <!-- enable commons-logging when inside jetty6:run -->
     <!--
     <dependency>

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java?rev=754973&r1=754972&r2=754973&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java (original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java Mon
Mar 16 18:22:41 2009
@@ -78,7 +78,12 @@
             return ((TextMessage) message).getText();
         }
         if (message instanceof ObjectMessage) {
-            return ((ObjectMessage) message).getObject();
+            try {
+                return ((ObjectMessage) message).getObject();
+            } catch (JMSException e) {
+                //message could not be parsed, make the reason available
+                return e;
+            }
         }
         if (message instanceof MapMessage) {
             return createMapBody((MapMessage) message);



Mime
View raw message