Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -555,4 +555,10 @@ public interface ActiveMQClientLogger extends BasicLogger {
@Message(id = 214033, value = "Cannot resolve host ",
format = Message.Format.MESSAGE_FORMAT)
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);

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.ActiveMQException;
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.RoutingType;
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.ClientMessage;
Expand All @@ -46,7 +48,6 @@
import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools;
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.remoting.ConsumerContext;
import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
Expand Down Expand Up @@ -1539,6 +1540,11 @@ public void end(final Xid xid, final int flags) throws XAException {
startCall();
try {
sessionContext.xaEnd(xid, flags);
} catch (ActiveMQNotConnectedException ex) {
ActiveMQClientLogger.LOGGER.connectionClosedWarn(ex.getType(), ex.getMessage());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you at least keep a logger.debug(ex.getMessage(), ex) here?

This way if a developer ever needs to debug on why.. it would give the developer more information?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and as I requested you this small change.. can you rebase against master? that would help me to find that pesky AIO failure on travis.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (logger.isDebugEnabled()) {
logger.debug(ex.getMessage(), ex);
}
} finally {
endCall();
}
Expand Down Expand Up @@ -1743,6 +1749,11 @@ public void rollback(final Xid xid) throws XAException {

try {
sessionContext.xaRollback(xid, wasStarted);
} catch (ActiveMQNotConnectedException ex) {
ActiveMQClientLogger.LOGGER.connectionClosedWarn(ex.getType(), ex.getMessage());
if (logger.isDebugEnabled()) {
logger.debug(ex.getMessage(), ex);
}
} finally {
if (wasStarted) {
start();
Expand Down