[
https://issues.apache.org/jira/browse/ARTEMIS-5916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18061685#comment-18061685
]
Justin Bertram edited comment on ARTEMIS-5916 at 2/27/26 5:14 PM:
------------------------------------------------------------------
Looks like we just need do something like:
{code:java}
} catch (Throwable e) {
ActiveMQException activeMQException = new
ActiveMQException(e.getMessage());
activeMQException.setCause(e);
throw activeMQException;
}{code}
I think verifying the change with a test will be more difficult than the actual
fix.
[~kascaks], did you plan to send a PR for this?
was (Author: jbertram):
Looks like we just need do something like:
{code:java}
} catch (Throwable e) {
ActiveMQException activeMQException = new
ActiveMQException(e.getMessage());
activeMQException.setCause(e);
throw activeMQException;
}{code}
I think verifying the change with a test will be more difficult than the actual
fix.
[~kascaks], did you want to plan to send a PR for this?
> Throwing ActiveMQException in ActiveMQSessionContext does not keep root cause
> -----------------------------------------------------------------------------
>
> Key: ARTEMIS-5916
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5916
> Project: Artemis
> Issue Type: Bug
> Affects Versions: 2.43.0
> Reporter: Stanislav Kascak
> Priority: Minor
>
> Only root cause message is supplied as an argument instead of the root cause
> exception as a whole to the ActiveMQException in ActiveMQSessionContext.
> In my case, this causes a problem as artemis in general does not
> re-interrupts thread when catching InterruptedException. This can be worked
> around by searching if InterruptedException is a cause of the exception
> catched in code that is using artemis client. In this case, however,
> InterruptedException that was a root cause is "lost".
> Line is question is this:
> https://github.com/apache/artemis/blob/72b581676a8521250cabbf3d951aa8d3ced2d244/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java#L1105
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]