Package javax.management

Examples of javax.management.MBeanRegistrationException


      ResourceMBean res = new ResourceMBean(obj);
      server.registerMBean(res, objName);
    } catch (InstanceAlreadyExistsException e) {
      log.error("register MBean failed " + e.getMessage());
      throw new MBeanRegistrationException(e, "The @MBean objectName is not unique");
    } catch (NotCompliantMBeanException e) {
      log.error("register MBean failed " + e.getMessage());
      throw new MBeanRegistrationException(e);
    }

  }
View Full Code Here


      {
         if (x instanceof MBeanRegistrationException)
         {
            throw (MBeanRegistrationException)x;
         }
         throw new MBeanRegistrationException(x);
      }
   }
View Full Code Here

         else if (xx instanceof MBeanRegistrationException)
            throw (MBeanRegistrationException)xx;
         else if (xx instanceof NotCompliantMBeanException)
            throw (NotCompliantMBeanException)xx;
         else
            throw new MBeanRegistrationException(xx);
      }
   }
View Full Code Here

       {
        throw (JMRuntimeException)x;
       }
         else if (x instanceof Exception)
         {
            throw new MBeanRegistrationException((Exception)x);
         }
         else if (x instanceof Error)
         {
            throw new MBeanRegistrationException(new RuntimeErrorException((Error)x));
         }
         else
         {
            throw new ImplementationException();
         }
View Full Code Here

      {
         throw x;
      }
      catch (Exception x)
      {
         throw new MBeanRegistrationException(x);
      }
      catch (Error x)
      {
         throw new MBeanRegistrationException(new RuntimeErrorException(x));
      }
   }
View Full Code Here

        ServicePoint sp1 = ((MBeanRegistrationContribution) mBeanList.get(0)).getServicePoint();
        ObjectName on1 = objectNameBuilder.createServiceObjectName(sp1);

        // Training
        server.registerMBean(null, null);
        serverControl.setThrowable(new MBeanRegistrationException(new Exception(
                "Registration failed")));
        serverControl.setDefaultMatcher(new AlwaysMatcher());
        server.registerMBean(null, null);
        serverControl.setThrowable(new MBeanRegistrationException(new Exception(
                "Registration failed")));
        server.registerMBean(null, null);
        serverControl.setThrowable(new MBeanRegistrationException(new Exception(
            "Registration failed")));

        replayControls();

        interceptLogging(MBeanRegistry.class.getName());
View Full Code Here

    }

    public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException,
            NotCompliantMBeanException {
        if (ObjectNameAddressUtil.isReservedDomain(name)) {
            throw new MBeanRegistrationException(new RuntimeException(MESSAGES.reservedMBeanDomain(Constants.DOMAIN)));
        }
        return delegate.registerMBean(object, name);
    }
View Full Code Here

        return helper.setAttributes(name, attributes);
    }

    public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException {
        if (ObjectNameAddressUtil.isReservedDomain(name)) {
            throw new MBeanRegistrationException(new RuntimeException(MESSAGES.reservedMBeanDomain(Constants.DOMAIN)));
        }
        delegate.unregisterMBean(name);
    }
View Full Code Here

        throw new UnsupportedOperationException("instantiate is not supported");
    }

    public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException,
            MBeanRegistrationException, NotCompliantMBeanException {
        throw new MBeanRegistrationException(new RuntimeException("You can't register mbeans under the reserved domain '"
                + Constants.DOMAIN + "'"));
    }
View Full Code Here

        throw new MBeanRegistrationException(new RuntimeException("You can't register mbeans under the reserved domain '"
                + Constants.DOMAIN + "'"));
    }

    public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException {
        throw new MBeanRegistrationException(new RuntimeException("You can't unregister mbeans under the reserved domain '"
                + Constants.DOMAIN + "'"));
    }
View Full Code Here

TOP

Related Classes of javax.management.MBeanRegistrationException

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.