mirror of https://github.com/apache/activemq.git
apply patch from https://issues.apache.org/activemq/browse/AMQ-2154, with thanks
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@754973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e989edaa1
commit
7b16aec2c0
|
@ -176,9 +176,10 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -78,7 +78,12 @@ public class MessageQuery extends QueueBrowseQuery {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue