Hi
I would like to dynamically add endpoints from my Java code. To this
aim, I do need access to the one and only JBIContainer instance. To get
hold of this instance, I did patch the JBIService class as follows:
@@ -108,6 +108,28 @@
}
/**
+ * Gets the JBI container to use
+ *
+ * @return The JBI container
+ *
+ * @jmx.managed-attribute
+ */
+ public JBIContainer getJbiContainer() {
+ return jbiContainer;
+ }
+
This allows me to get a reference to the JBIContainer via JMX, and to
add my endpoints with jbi.activateComponent(), this works all pretty well.
However, I wondered what the preferred way for doing this would be.
Ideally, JMX service JBIContainer would expose an interface which could
be reused via MBeanServerInvocationHandler, however, this is not
possible in the present implementation. Any other ideas?
Regards
Andreas