This issue was raised by Reza as one of his initial priorities, and although this would help the development of
frameworks that use JMS it also stands alone as a possible improvement. I've therefore logged it as an issue in its own
right in JIRA.
I'm conscious this might be an incompatible change which we would need to consider carefully. Comments please, both on
whether you think this is desirable in principle and whether you think it is practical to make as a change in JMS 2.0.
Also, if you would like to suggest alternative ways of achieving the same result (e.g. a completely new API) then please
say so.
http://java.net/jira/browse/JMS_SPEC-35
"In JMS 1.1, almost every method in the JMS API throws a javax.jms.Exception, which is an unchecked exception and so
needs to be caught and handled by the application.
"In practice the developer rarely knows what to do in such circumstances, and provides some generic exception handling
that is not specific to {{JMSException}}s. The result is to clutter the application code with boilerplate exception
handling which adds little value.
"In addition, the fact that so many API methods throw this checked exception makes it more difficult to construct
frameworks on top of the JMS API.
"It is therefore proposed that the JSR 343 Expert Group consider whether they should change the JMS API to throw
unchecked rather than checked exceptions as much as possible. One simple way of achieving this would be to change
{{javax.jms.JMSException}} to extend {{java.lang.RuntimeException}} instead of {{java.lang.Exception}}.
"Existing applications which explicitly catch {JMSException}}s would not need to be changed. "
Nigel