Package javax.management

Examples of javax.management.InstanceNotFoundException


                Object value = kernel.getAttribute(abstractName, attribute);
                attributeList.add(i, new Attribute(attribute, value));
            } catch (NoSuchAttributeException e) {
                // ignored - caller will simply find no value
            } catch (GBeanNotFoundException e) {
                throw new InstanceNotFoundException(name.getCanonicalName());
            } catch (InternalKernelException e) {
                throw new ReflectionException(unwrapInternalKernelException(e));
            } catch (Exception e) {
                // ignored - caller will simply find no value
            }
View Full Code Here


        AbstractName abstractName = toAbstractName(name);
        GBeanInfo gbeanInfo;
        try {
            gbeanInfo = kernel.getGBeanInfo(abstractName);
        } catch (GBeanNotFoundException e) {
            throw new InstanceNotFoundException(name.getCanonicalName());
        } catch (InternalKernelException e) {
            throw new ReflectionException(unwrapInternalKernelException(e));
        }
        return JMXUtil.toMBeanInfo(gbeanInfo);
    }
View Full Code Here

            return kernel.invoke(abstractName, operationName, params, signature);
        } catch (NoSuchOperationException e) {
            throw new ReflectionException(new NoSuchMethodException(e.getMessage()));
        } catch (GBeanNotFoundException e) {
            if(name.equals(e.getGBeanName())) {
                throw new InstanceNotFoundException(name.getCanonicalName());
            }
            throw new MBeanException(e);
        } catch (InternalKernelException e) {
            throw new MBeanException(unwrapInternalKernelException(e));
        } catch (Exception e) {
View Full Code Here

        try {
            kernel.setAttribute(abstractName, attributeName, attributeValue);
        } catch (NoSuchAttributeException e) {
            throw new AttributeNotFoundException(attributeName);
        } catch (GBeanNotFoundException e) {
            throw new InstanceNotFoundException(name.getCanonicalName());
        } catch (InternalKernelException e) {
            throw new MBeanException(unwrapInternalKernelException(e));
        } catch (Exception e) {
            throw new MBeanException(e);
        }
View Full Code Here

                kernel.setAttribute(abstractName, attributeName, attributeValue);
                set.add(attribute);
            } catch (NoSuchAttributeException e) {
                // ignored - caller will see value was not set because this attribute will not be in the attribute list
            } catch (GBeanNotFoundException e) {
                throw new InstanceNotFoundException(name.getCanonicalName());
            } catch (InternalKernelException e) {
                throw new ReflectionException(unwrapInternalKernelException(e));
            } catch (Exception e) {
                // ignored - caller will see value was not set because this attribute will not be in the attribute list
            }
View Full Code Here

        AbstractName abstractName = toAbstractName(objectName);
        try {
            GBeanInfo gbeanInfo = kernel.getGBeanInfo(abstractName);
            return new ObjectInstance(objectName, gbeanInfo.getClassName());
        } catch (GBeanNotFoundException e) {
            throw new InstanceNotFoundException(objectName.getCanonicalName());
        }
    }
View Full Code Here

    public ClassLoader getClassLoaderFor(ObjectName objectName) throws InstanceNotFoundException {
        AbstractName abstractName = toAbstractName(objectName);
        try {
            return kernel.getClassLoaderFor(abstractName);
        } catch (GBeanNotFoundException e) {
            throw new InstanceNotFoundException(objectName.getCanonicalName());
        }
    }
View Full Code Here

        {
            final String xpath = info.getXPath();
            cb = ConfigBeansFactory.getConfigBeanByXPath(ctx, xpath);
            if (null == cb)
            {
                throw new InstanceNotFoundException(
                    localStrings.getString("configsMBean.mbean_not_found",
                    info.getObjectName()));
            }
        }
        catch (Exception e)
View Full Code Here

    catch( Exception e )
    {
      // root cause should be an InstanceNotFoundException containing the ObjectName
      final Throwable  t  = ExceptionUtil.getRootCause( e );
      assert( t instanceof InstanceNotFoundException );
      final InstanceNotFoundException  inf  = (InstanceNotFoundException)t;
     
      final String  msg  = inf.getMessage();
      final int    objectNameStart  = msg.indexOf( "amx:" );
      final String  objectNameString  = msg.substring( objectNameStart, msg.length() );
     
      final ObjectName  on  = Util.newObjectName( objectNameString );
     
View Full Code Here

       items.add( new Error( "Error test" ) );
      
       items.add( new MBeanException(
               new Exception("within MBeanException"), "MBeanException test") );
       items.add( new AttributeNotFoundException( "Test") );
       items.add( new InstanceNotFoundException("InstanceNotFoundException test ") );
      
       items.add( new ClassNotFoundException( "foo.bar") );
      
       return items;
    }
View Full Code Here

TOP

Related Classes of javax.management.InstanceNotFoundException

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.