mirror of https://github.com/apache/activemq.git
This commit is contained in:
parent
f9451e56e2
commit
da72aa6570
|
@ -27,6 +27,7 @@ import java.util.LinkedList;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import javax.jms.InvalidClientIDException;
|
||||||
import javax.jms.InvalidSelectorException;
|
import javax.jms.InvalidSelectorException;
|
||||||
|
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
|
@ -426,7 +427,13 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
|
||||||
|
|
||||||
if (response.isException()) {
|
if (response.isException()) {
|
||||||
Throwable exception = ((ExceptionResponse) response).getException();
|
Throwable exception = ((ExceptionResponse) response).getException();
|
||||||
|
if (exception instanceof SecurityException) {
|
||||||
protonConnection.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage()));
|
protonConnection.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage()));
|
||||||
|
} else if (exception instanceof InvalidClientIDException) {
|
||||||
|
protonConnection.setCondition(new ErrorCondition(AmqpError.INVALID_FIELD, exception.getMessage()));
|
||||||
|
} else {
|
||||||
|
protonConnection.setCondition(new ErrorCondition(AmqpError.ILLEGAL_STATE, exception.getMessage()));
|
||||||
|
}
|
||||||
protonConnection.close();
|
protonConnection.close();
|
||||||
pumpProtonToSocket();
|
pumpProtonToSocket();
|
||||||
amqpTransport.onException(IOExceptionSupport.create(exception));
|
amqpTransport.onException(IOExceptionSupport.create(exception));
|
||||||
|
|
Loading…
Reference in New Issue