Package org.jolokia.request

Examples of org.jolokia.request.JmxObjectNameRequest


        }

        @Override
        public void preDispatch(Set<MBeanServer> pMBeanServers, JmxRequest pJmxReq) {
            if (pJmxReq instanceof JmxObjectNameRequest) {
                JmxObjectNameRequest request = (JmxObjectNameRequest) pJmxReq;
                if (request.getObjectName() != null &&
                        "java.lang".equals(request.getObjectName().getDomain())) {
                    try {
                        // invoking getMBeanInfo() works around a bug in getAttribute() that fails to
                        // refetch the domains from the platform (JDK) bean server (e.g. for MXMBeans)
                        for (MBeanServer s : pMBeanServers) {
                            try {
                                s.getMBeanInfo(request.getObjectName());
                                return;
                            } catch (InstanceNotFoundException exp) {
                                // Only one server can have the name. So, this exception
                                // is being expected to happen
                            }
                        }
                    } catch (IntrospectionException e) {
                        throw new IllegalStateException("Workaround for JBoss failed for object " + request.getObjectName() + ": " + e);
                    } catch (ReflectionException e) {
                        throw new IllegalStateException("Workaround for JBoss failed for object " + request.getObjectName() + ": " + e);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.jolokia.request.JmxObjectNameRequest

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.