Skip to content

Backward compatibility: initDefaultStrategies() is no longer invoked on subclasses of "MessageListenerAdapter" [SPR-15043] #19609

@spring-projects-issues

Description

@spring-projects-issues

Gordon Daugherty opened SPR-15043 and commented

Tl;dr - This comment more succinctly states the concern.


We have an extension of "MessageListenerAdapter" in a widely-shared component. That component doesn't work with Spring versions 4.1.0 and higher due to it no longer invoking "initDefaultStrategies()". As apps that use that component upgrade past Spring v4.0.9 they're experiencing breakages.

Before we patch around the issue I wanted to check with the Spring team to make sure that this change was a deliberate design evolution choice and not a mistake.

As you can see in this API analysis report v4.1.0 of library "spring-jms" removed the protected method "initDefaultStrategies()" from MessageListenerAdapter. This commit was made in support of delivering #14515 and made MessageListenerAdapter extend "AbstractAdaptableMessageListener" and moved the initDefaultStrategies() call to that class. So far so good / I don't think this commit is an issue. This later commit was made in support of
#15500 which removed the initDefaultStrategies() call from "AbstractAdaptableMessageListener".

Neither of the Jira tickets appears to speak to an intentional change of this behavior. If it was intentional your response(s) to this ticket will serve to document for others the "why" behind this backward-incompatible change.

If this change wasn't intentional and you fix it in a later version of Spring that simplifies my process and my software as I can just enable controls to prevent people from using the versions that lack the necessary code.

This comment explains why I think this change was unintentional.


Affects: 4.1.9

Issue Links:

Referenced from: commits afe0228

1 votes, 4 watchers

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: enhancementA general enhancementtype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions