New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ARTEMIS-1770] Log warning instead of stacktrace while shutdown #1990
Conversation
While clear shutdown it makes no sence to throw any exception. It should be sufficient just to log message about whats happening. |
import org.apache.activemq.artemis.api.core.ActiveMQExceptionType; | ||
import org.apache.activemq.artemis.api.core.Message; | ||
import org.apache.activemq.artemis.api.core.SimpleString; | ||
import org.apache.activemq.artemis.api.core.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Star imports like this are not allowed by our checkstyle config. You'll need to change this for the PR build to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbertram Fixed.
515002f
to
688d63b
Compare
Can someone please run retest? I have the same issue on Travis as this PR: #1985 and I think it has nothing to do with my PR |
@@ -1539,6 +1540,8 @@ 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()); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clebertsuconic Done.
Jira: https://issues.apache.org/jira/browse/ARTEMIS-1770