Search code examples
quickfixj

How to clean MBean context of QuickFIX/J properly?


I have 2 Java integration tests, each of them creates QuickFIX/J FIX session with the same property file.

When second test is running once I try to start connector QuickFIX/J creates session and tries to register an MBean for it. In both tests sessions have the same name, so ObjectName for MBean is the same for second test and its registration fails.

What is a correct way for QuickFIX/J to unregister/clear MBeans that could be used in tests?


Solution

  • The issue was with the call of JmxExporter for connector object. It leads to registration of JMX beans for session later. See Christoph John replies.