Package com.sun.enterprise.admin.mbeans.custom.loading

Examples of com.sun.enterprise.admin.mbeans.custom.loading.CustomMBeanRegistrationImpl


            // fetch the MBeanServer
            final MBeanServer mbs = MBeanServerFactory.getMBeanServer();

            // Create a helper to do the reg/unreg...
            CustomMBeanRegistrationImpl cmr = new CustomMBeanRegistrationImpl(mbs);

            // register it
            cmr.registerMBean(mbean);

            // get the REAL ObjectName
            ObjectName ron = cmr.getCascadingAwareObjectName(mbean);

            // now fetch the MBeanInfo
            MBeanInfo info = mbs.getMBeanInfo(ron);

            // unregister it...
View Full Code Here


    public MBeanValidator() {
        mbs = MBeanServerFactory.newMBeanServer();
    }
    public ObjectName registerTestMBean(final Map<String, String> params, final Map<String, String> attributes) throws RuntimeException {
        try {
            CustomMBeanRegistration cmr = new CustomMBeanRegistrationImpl(mbs);
            final Mbean m = toMbean(params, attributes, true);
            final ObjectName ron = cmr.registerMBean(m);
            return ( ron );
        } catch (final Exception e) {
            throw new RuntimeException(e);
        }
       
View Full Code Here

        final ObjectName on = CustomMBeanRegistrationImpl.getCascadingAwareObjectName(mbean);
        if (mbs.isRegistered(on)) {
            logger.info(CMBStrings.get("cmb.unsuccessfulRegistration", on));
        }
        else {
            final CustomMBeanRegistration cmr = new CustomMBeanRegistrationImpl(mbs);
            cmr.registerMBean(mbean);
            logger.info(CMBStrings.get("cmb.successfulRegistration",  mbean.getName()));
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.mbeans.custom.loading.CustomMBeanRegistrationImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.