This closes #1990
This commit is contained in:
commit
97ccf96bb4
|
@ -555,4 +555,10 @@ public interface ActiveMQClientLogger extends BasicLogger {
|
||||||
@Message(id = 214033, value = "Cannot resolve host ",
|
@Message(id = 214033, value = "Cannot resolve host ",
|
||||||
format = Message.Format.MESSAGE_FORMAT)
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
void unableToResolveHost(@Cause UnknownHostException e);
|
void unableToResolveHost(@Cause UnknownHostException e);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 214034, value = "Connection closed: {0} - {1}",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void connectionClosedWarn(ActiveMQExceptionType type, String message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,9 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
|
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.ActiveMQExceptionType;
|
import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
|
||||||
|
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
|
||||||
import org.apache.activemq.artemis.api.core.Message;
|
import org.apache.activemq.artemis.api.core.Message;
|
||||||
|
import org.apache.activemq.artemis.api.core.RoutingType;
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString;
|
import org.apache.activemq.artemis.api.core.SimpleString;
|
||||||
import org.apache.activemq.artemis.api.core.client.ClientConsumer;
|
import org.apache.activemq.artemis.api.core.client.ClientConsumer;
|
||||||
import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
||||||
|
@ -46,7 +48,6 @@ import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
|
||||||
import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
|
import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
|
||||||
import org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools;
|
import org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools;
|
||||||
import org.apache.activemq.artemis.core.remoting.FailureListener;
|
import org.apache.activemq.artemis.core.remoting.FailureListener;
|
||||||
import org.apache.activemq.artemis.api.core.RoutingType;
|
|
||||||
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
|
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
|
||||||
import org.apache.activemq.artemis.spi.core.remoting.ConsumerContext;
|
import org.apache.activemq.artemis.spi.core.remoting.ConsumerContext;
|
||||||
import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
|
import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
|
||||||
|
@ -1539,6 +1540,11 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
||||||
startCall();
|
startCall();
|
||||||
try {
|
try {
|
||||||
sessionContext.xaEnd(xid, flags);
|
sessionContext.xaEnd(xid, flags);
|
||||||
|
} catch (ActiveMQNotConnectedException ex) {
|
||||||
|
ActiveMQClientLogger.LOGGER.connectionClosedWarn(ex.getType(), ex.getMessage());
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug(ex.getMessage(), ex);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
endCall();
|
endCall();
|
||||||
}
|
}
|
||||||
|
@ -1743,6 +1749,11 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sessionContext.xaRollback(xid, wasStarted);
|
sessionContext.xaRollback(xid, wasStarted);
|
||||||
|
} catch (ActiveMQNotConnectedException ex) {
|
||||||
|
ActiveMQClientLogger.LOGGER.connectionClosedWarn(ex.getType(), ex.getMessage());
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug(ex.getMessage(), ex);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (wasStarted) {
|
if (wasStarted) {
|
||||||
start();
|
start();
|
||||||
|
|
Loading…
Reference in New Issue