mirror of https://github.com/apache/activemq.git
[AMQ-6494] ensure vm transport propagates onCommand exceptions to peer
This commit is contained in:
parent
0f7561e85a
commit
729766e492
|
@ -35,6 +35,7 @@ import org.apache.activemq.transport.ResponseCallback;
|
|||
import org.apache.activemq.transport.Transport;
|
||||
import org.apache.activemq.transport.TransportDisposedIOException;
|
||||
import org.apache.activemq.transport.TransportListener;
|
||||
import org.apache.activemq.util.IOExceptionSupport;
|
||||
import org.apache.activemq.wireformat.WireFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -270,7 +271,14 @@ public class VMTransport implements Transport, Task {
|
|||
|
||||
Object command = mq.poll();
|
||||
if (command != null && !disposed.get()) {
|
||||
try {
|
||||
tl.onCommand(command);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
peer.transportListener.onException(IOExceptionSupport.create(e));
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
return !mq.isEmpty() && !disposed.get();
|
||||
} else {
|
||||
if(disposed.get()) {
|
||||
|
|
|
@ -137,7 +137,7 @@ public class ThreadExplorer
|
|||
if (thread != null)
|
||||
{
|
||||
out.append("* [" + thread.getName() + "] " + (thread.isDaemon() ? "(Daemon)" : "")
|
||||
+ " Group: " + thread.getThreadGroup().getName() + "\n");
|
||||
+ " Group: " + (thread.getThreadGroup() != null ? thread.getThreadGroup().getName() : "") + "\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue