public void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException { try { registerMBeanWithServer(obj, name, forceRegistration); } catch (NotCompliantMBeanException e) { // If this is not a "normal" MBean, then try to deploy it using JMX annotations ManagementMBeanAssembler assembler = camelContext.getManagementMBeanAssembler(); ObjectHelper.notNull(assembler, "ManagementMBeanAssembler", camelContext); Object mbean = assembler.assemble(server, obj, name); if (mbean != null) { // and register the mbean registerMBeanWithServer(mbean, name, forceRegistration); } } }
public ManagementMBeanAssembler getManagementMBeanAssembler() { return managementMBeanAssembler; }
public void setManagementMBeanAssembler(ManagementMBeanAssembler managementMBeanAssembler) { this.managementMBeanAssembler = managementMBeanAssembler; }
/** * Lazily create a default implementation */ protected ManagementMBeanAssembler createManagementMBeanAssembler() { return new DefaultManagementMBeanAssembler(this); }
@Override protected ManagementMBeanAssembler createManagementMBeanAssembler() { // use a spring mbean assembler return new SpringManagementMBeanAssembler(this); }
@Override public ManagementMBeanAssembler getManagementMBeanAssembler() { return context.getManagementMBeanAssembler(); }
/** * Returns the management mbean assembler * * @return the mbean assembler */ ManagementMBeanAssembler getManagementMBeanAssembler();