[ 
https://issues.apache.org/jira/browse/AMQ-9418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17807410#comment-17807410
 ] 

Christopher L. Shannon commented on AMQ-9418:
---------------------------------------------

I decided to go with a client side approach as described here 
https://lists.apache.org/thread/pr2ty60xx54tm3tfnfb1k2hbrmvm59no

We can provide updated clients (5.18.x, 6.0.x, etc) that can do the conversion 
to the correct JMS package if the wrong type is received which is much simpler 
than the broker having to try and figure out what to send back and doesn't 
require the broker to keep both versions on the classpath. The downside is any 
client that wants to handle the conversion needs an upgrade but I think that is 
ok as long as we document it. Any other clients will just get back a generic 
JMSException type so would still work just with a less specific exception. The 
main use case would be for users that have a client or a broker that is 
mismatched for whatever reason (maybe stuck on an old JDK version, etc) so one 
is using jakarta and one is using javax. In this case they can still upgrade to 
the latest versions of that client library line if they want the conversion to 
work (5.17.x or 5.18.x or whatever)  and we can document this on the website 
for people looking at compatibility between brokers. This obviously means NMS 
clients or other non-java clients would need an update as well.

Going forward with a new version of OpenWire (maybe v13 or v14 etc) ideally we 
would replace the ExceptionResponse command with a new version 
(ExceptionResponseV2 or whatever we want to call it) and it can use error codes 
and allow the client to decide how to convert to exceptions so we are not 
having to send them back. This also prevents future security issues like the 
one we recently patched.

> Support mapping jakarta -> javax exceptions in openwire
> -------------------------------------------------------
>
>                 Key: AMQ-9418
>                 URL: https://issues.apache.org/jira/browse/AMQ-9418
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Matt Pavlovich
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 5.18.4, 5.17.7, 5.16.8, 6.0.2
>
>
> For javax clients to connect to jakarta-based broker, we need to map 
> exceptions to the javax namespace from jakarta-based broker-side exceptions 
> and vice versa for jakarta clients talking to a javax broker.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to