Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQAutoConfiguration property condition #49

Closed
zsenyeg opened this issue Feb 19, 2020 · 1 comment
Closed

MQAutoConfiguration property condition #49

zsenyeg opened this issue Feb 19, 2020 · 1 comment

Comments

@zsenyeg
Copy link

zsenyeg commented Feb 19, 2020

Hey,

com.ibm.mq.spring.boot.MQAutoConfiguration auto configuration depends on spring.jta.enabled spring property. Auto configuration is not working if spring.jta.enabled is false.

Can you help me to understand this property dependency? Why this autoconfiguration is bound to jta?

  • ibmmq-jms-spring version: 2.1.2
  • spring boot version: 2.2.0.RELEASE
  • Java version: Oracle 1.8, RHEL
@Configuration
@ConditionalOnProperty(
    prefix = "spring.jta",
    value = {"enabled"},
    matchIfMissing = true
)
@AutoConfigureBefore({JmsAutoConfiguration.class})
@AutoConfigureAfter({JndiConnectionFactoryAutoConfiguration.class, JtaAutoConfiguration.class})
@ConditionalOnClass({ConnectionFactory.class, MQConnectionFactory.class})
@ConditionalOnMissingBean({ConnectionFactory.class})
@EnableConfigurationProperties({MQConfigurationProperties.class, JmsProperties.class})
@Import({MQXAConnectionFactoryConfiguration.class, MQConnectionFactoryConfiguration.class})
public class MQAutoConfiguration {
    public MQAutoConfiguration() {
    }
}

Cheers,
zsenyeg

@ibmmqmet
Copy link
Collaborator

ibmmqmet commented Mar 2, 2020

There doesn't seem to be a good reason for that check on the property. Perhaps there was some time ago, but it doesn't appear to be needed now at any rate. I'll remove that check next time I update the package.

ibmmqmet added a commit that referenced this issue Apr 2, 2020
Update prereq versions

Signed-off-by: ibmmqmet <marke_taylor@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants