Skip to content

ARTEMIS-5947: Fix newActiveMQServer(String,...) ignoring XML persistence-enabled setting#6286

Merged
clebertsuconic merged 2 commits intomainfrom
ARTEMIS-5947-fix-persistence-enabled
Mar 11, 2026
Merged

ARTEMIS-5947: Fix newActiveMQServer(String,...) ignoring XML persistence-enabled setting#6286
clebertsuconic merged 2 commits intomainfrom
ARTEMIS-5947-fix-persistence-enabled

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 10, 2026

Summary

  • ActiveMQServers.newActiveMQServer(String, MBeanServer, ActiveMQSecurityManager) was calling the 3-arg newActiveMQServer(Configuration, MBeanServer, SecurityManager) which hardcodes enablePersistence=true, overriding whatever was parsed from XML (e.g. <persistence-enabled>false</persistence-enabled>)
  • Changed to call the 4-arg version with config.isPersistenceEnabled() to preserve the XML setting
  • Added a unit test that verifies persistence-enabled=false from XML config is respected

Test plan

  • New unit test ActiveMQServersTest.testNewActiveMQServerFromConfigURLRespectsXmlPersistenceEnabled passes
  • Existing tests pass

…nce-enabled setting

The 3-arg newActiveMQServer(String, MBeanServer, ActiveMQSecurityManager) method
was calling the 3-arg newActiveMQServer(Configuration, MBeanServer, SecurityManager)
which hardcodes enablePersistence=true, overriding whatever was parsed from the XML
configuration file. Changed to call the 4-arg version with config.isPersistenceEnabled()
to preserve the XML setting.
@clebertsuconic
Copy link
Contributor

@gnodet thanks a lot

@clebertsuconic clebertsuconic merged commit 294b0dc into main Mar 11, 2026
12 checks passed
@clebertsuconic clebertsuconic deleted the ARTEMIS-5947-fix-persistence-enabled branch March 11, 2026 13:18
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

Successfully merging this pull request may close these issues.

3 participants