jsr368-experts@jms-spec.java.net

[jsr368-experts] Re: [jms-spec users] JMS 2.0 Errata: JMS_SPEC-161 (serialVersionUID of JMSException has changed from JMS 1.1 to JMS 2.0 )

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Tue, 09 Dec 2014 16:33:11 +0000

On 25/11/2014 15:34, Nigel Deakin wrote:
>
> The first issue is
> https://java.net/jira/browse/JMS_SPEC-161
> (serialVersionUID of JMSException has changed from JMS 1.1 to JMS 2.0)
>
> The problem is that the serialVersionUID of javax.jms.JMSException has changed from JMS 1.1 to JMS 2.0, which means that
> if an instance of this exception is serialized using JMS 1.1 it cannot be deserialized using JMS 2.0 or vice versa.
>
> Although this class is defined in the JMS specification, its implementation is, strictly speaking, part of the RI. We
> can therefore fix this issue by fixing the reference implementation and releasing a new version of the JMS API jar to
> Maven Central. I am planning to do this now without waiting for the errata release. The new jar will be version 2.0.1,
> where the ".1" is an implementation version. The spec version remains unchanged at 2.0.
>
> I've recorded the fix details in the MQ JIRA
> https://java.net/jira/browse/MQ-359

I asked the Java EE spec leads to advise me whether there was an overriding Java EE requirement to preserve
serialization compatibility between spec versions. By way of reply, they added a new section "Serialization
compatibility" to the "backwards compatibility requirements for Java EE specifications" at
https://java.net/projects/javaee-spec/pages/CompatibilityRequirements . I think this requirement confirms that we have
a bug in the JMS 2.0 API jar which needs to be fixed.

As mentioned above, I have now fixed this error in the reference implementation. See the JIRA above for details.

We have now released a new JMS 2.0 API jar to maven central at
http://search.maven.org/#artifactdetails|javax.jms|javax.jms-api|2.0.1-b01|jar .

This is a release candidate (hence the b01 suffix), for the purposes of testing. Anyone is welcome to test it.

As described in MQ-359 this new release sets the serialVersionUID field of each exception class. This changes the JMS
2.0 javadocs (something that I had previously missed). Since the javadocs form part of the spec, I think it's best to
make the final release of this jar at the same time as the JMS 2.0 errata release.

Nigel