Are MBean interfaces allowed in the global module?

I was writing a javadoc for a middleware service interface when stumbled upon unability to create a nice @link (or @see) to my MBean, because it was in the core module (with the service interface being in the global module).

Not that it is a problem of some sort, but made me curious. Every CUBA-related thing, that I saw, had its MBean interfaces and their implementations in the core module (in the same package, to be exact).

The question is, are there any paricular reasons for MBean interfaces to be in the core module, besides closing them off from the other layers?
I haven’t found any difference.

Sorry, if the question seems too amateur, and thank you in advance.


Managed beans can be created on any tier. Note that it is necessary to create the bean in the module where it will be used

So there’s indeed no difference, if MBean interfaces were put in the global.

The jmx-beans themselves should be created in the core, of course, I was talking only about their interfaces.

Thank you!

Actually, you can create JMX beans even in global module. Just do not forget to register them in core / web spring.xml.
See com.haulmont.cuba.core.sys.jmx.JmxNodeIdentifier as the example.

Don’t know, how I missed it earlier. Thank you!