git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@754973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-03-16 18:22:41 +00:00
parent 6e989edaa1
commit 7b16aec2c0
3 changed files with 15 additions and 4 deletions

View File

@ -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);
}

View File

@ -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>

View File

@ -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);