Package javax.management

Examples of javax.management.MBeanInfo


        MBeanServer server = ManagementFactory.getPlatformMBeanServer();
        ObjectName invocationsName = new ObjectName("openejb.management:J2EEServer=openejb,J2EEApplication=null,EJBModule=StatsInvocModule,StatelessSessionBean=CounterBean,j2eeType=Invocations,name=CounterBean");

        // Grab the mbeanInfo and check the expected attributes exist and have the correct return types and parameters       
        MBeanInfo invocationsMBeanInfo = server.getMBeanInfo(invocationsName);
        for (MBeanAttributeInfo info : invocationsMBeanInfo.getAttributes()) {
//            System.out.println("//" + info.getName() + " " + server.getAttribute(invocationsName, info.getName()));
            if (info.getName().equals("waitSecs().GeometricMean")
                    || info.getName().equals("waitSecs().Max")
                    || info.getName().equals("waitSecs().Mean")
                    || info.getName().equals("waitSecs().Min")
View Full Code Here


            MBeanGBeanBridge mbeanGBeanBridge;
            synchronized (this) {
                if (registry.containsKey(abstractName)) {
                    return;
                }
                MBeanInfo mbeanInfo = JMXUtil.toMBeanInfo(kernel.getGBeanInfo(abstractName));
                mbeanGBeanBridge = new MBeanGBeanBridge(kernel, abstractName, abstractName.getObjectName(), mbeanInfo);
                registry.put(abstractName, mbeanGBeanBridge);
            }
            mbeanServer.registerMBean(mbeanGBeanBridge, mbeanGBeanBridge.getObjectName());
        } catch (GBeanNotFoundException e) {
View Full Code Here

        }

        MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[1];
        notifications[0] = new MBeanNotificationInfo(NotificationType.TYPES, "javax.management.Notification", "J2EE Notifications");

        MBeanInfo mbeanInfo = new MBeanInfo(className, description, attributes, constructors, operations, notifications);
        return mbeanInfo;
    }
View Full Code Here

                for (int i = 0; i < notifs.length; i++)
                    notifications[i] = notifs[i].createNotificationInfo();


                // Construct and return a new ModelMBeanInfo object
                info = new MBeanInfo(getClassName(),
                                     getDescription(),
                                     attributes,
                                     new MBeanConstructorInfo[] {},
                                     operations,
                                     notifications);
View Full Code Here

     */
    protected void bindAttributes(MBeanServerConnection jmxServerConnection, String resultproperty, String pname, ObjectName oname) {
        if (jmxServerConnection != null  && resultproperty != null
            && pname != null && oname != null ) {
            try {
                MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname);
                String code = minfo.getClassName();
                if ("org.apache.commons.modeler.BaseModelMBean".equals(code)) {
                    code = (String) jmxServerConnection.getAttribute(oname,
                            "modelerType");
                }
                MBeanAttributeInfo attrs[] = minfo.getAttributes();
                Object value = null;

                for (int i = 0; i < attrs.length; i++) {
                    if (!attrs[i].isReadable())
                        continue;
View Full Code Here

                }
            }
            clazz = clazz.getSuperclass();
        }

        info = new MBeanInfo(annotatedMBean.getName(),
                description,
                attributeInfos.toArray(new MBeanAttributeInfo[attributeInfos.size()]),
                null, // default constructor is mandatory
                operationInfos.toArray(new MBeanOperationInfo[operationInfos.size()]),
                notificationInfos.toArray(new MBeanNotificationInfo[notificationInfos.size()]));
View Full Code Here

            MBeanServerConnection jmxServerConnection,
            String name,
            String attribute) throws Exception {
        ObjectName oname = new ObjectName(name);
        String mattrType = null;
        MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname);
        MBeanAttributeInfo attrs[] = minfo.getAttributes();
        if (attrs != null) {
            for (int i = 0; mattrType == null && i < attrs.length; i++) {
                if (attribute.equals(attrs[i].getName()))
                    mattrType = attrs[i].getType();
            }
View Full Code Here

            }

            try
            {
                //Get the impact attribute
                MBeanInfo mbeanInfo = _mbs.getMBeanInfo((ObjectName) args[0]);
                if (mbeanInfo != null)
                {
                    MBeanOperationInfo[] opInfos = mbeanInfo.getOperations();
                    for (MBeanOperationInfo opInfo : opInfos)
                    {
                        if (opInfo.getName().equals(mbeanMethod))
                        {
                            return opInfo.getImpact();
View Full Code Here

    public MBeanInfo getMBeanInfo()
    {
        MBeanAttributeInfo[] attribs = new MBeanAttributeInfo[_attributes.size()];
        _attributes.toArray(attribs);

        MBeanInfo mb = new MBeanInfo(_className, _description, attribs, _constructors, _operations,
                new MBeanNotificationInfo[0]);
        // cat.debug("getMBeanInfo exit.");
        return mb;
    }
View Full Code Here

        }
    }

    public synchronized MBeanInfo getMBeanInfo() {

        return new MBeanInfo(getObject().getClass().getCanonicalName(),
                             description,
                             attrInfo,
                             null,
                             opInfo,
                             null);
View Full Code Here

TOP

Related Classes of javax.management.MBeanInfo

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.