Removing dead code - AMQPBrokerStoppedException
This commit is contained in:
parent
04ca86c3dd
commit
12de35892a
|
@ -39,7 +39,6 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQException;
|
import org.apache.activemq.artemis.api.core.ActiveMQException;
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
|
import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQSecurityException;
|
import org.apache.activemq.artemis.api.core.ActiveMQSecurityException;
|
||||||
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQBrokerStoppedException;
|
|
||||||
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQCompositeConsumerBrokerExchange;
|
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQCompositeConsumerBrokerExchange;
|
||||||
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext;
|
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext;
|
||||||
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer;
|
import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer;
|
||||||
|
@ -635,28 +634,6 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor, S
|
||||||
if (e instanceof IOException) {
|
if (e instanceof IOException) {
|
||||||
serviceTransportException((IOException) e);
|
serviceTransportException((IOException) e);
|
||||||
}
|
}
|
||||||
else if (e.getClass() == AMQBrokerStoppedException.class) {
|
|
||||||
// Handle the case where the broker is stopped
|
|
||||||
// But the client is still connected.
|
|
||||||
if (!stopping.get()) {
|
|
||||||
ConnectionError ce = new ConnectionError();
|
|
||||||
ce.setException(e);
|
|
||||||
dispatchSync(ce);
|
|
||||||
// Record the error that caused the transport to stop
|
|
||||||
this.stopError = e;
|
|
||||||
// Wait a little bit to try to get the output buffer to flush
|
|
||||||
// the exception notification to the client.
|
|
||||||
try {
|
|
||||||
Thread.sleep(500);
|
|
||||||
}
|
|
||||||
catch (InterruptedException ie) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
|
||||||
// Worst case is we just kill the connection before the
|
|
||||||
// notification gets to him.
|
|
||||||
stopAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!stopping.get() && !inServiceException) {
|
else if (!stopping.get() && !inServiceException) {
|
||||||
inServiceException = true;
|
inServiceException = true;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
|
||||||
* this work for additional information regarding copyright ownership.
|
|
||||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
* (the "License"); you may not use this file except in compliance with
|
|
||||||
* the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.activemq.artemis.core.protocol.openwire.amq;
|
|
||||||
|
|
||||||
public class AMQBrokerStoppedException extends IllegalStateException {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = -7543507221414251115L;
|
|
||||||
|
|
||||||
public AMQBrokerStoppedException() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
public AMQBrokerStoppedException(String message, Throwable cause) {
|
|
||||||
super(message);
|
|
||||||
initCause(cause);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AMQBrokerStoppedException(String s) {
|
|
||||||
super(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AMQBrokerStoppedException(Throwable cause) {
|
|
||||||
initCause(cause);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue