Package javax.management

Examples of javax.management.MBeanRegistrationException


        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")));

        replayControls();

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


      {
         // don't double wrap MBeanRegistrationException
         if (e instanceof MBeanRegistrationException)
            throw (MBeanRegistrationException)e;
           
         throw new MBeanRegistrationException(e, "preDeregister");
      }

      // Remove any classloader
      if (resource instanceof ClassLoader)
         loaderRepository.removeClassLoader((ClassLoader)resource);
View Full Code Here

         if (e instanceof MBeanRegistrationException)
         {
            throw (MBeanRegistrationException)e;
         }
        
         throw new MBeanRegistrationException(e,
               "preRegister() failed: " +
               "[ObjectName='" + regName +
               "', Class=" + invoker.getResource().getClass().getName() +
               " (" + invoker.getResource() + ")]"
         );
View Full Code Here

  
   }
  
   public void preDeregister() throws Exception
   {
      throw new MBeanRegistrationException(new MyScreamingException(), "you can't unregister me!");
   }
View Full Code Here

public class Test4 implements Test4MBean, MBeanRegistration
{

   public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
   {
      throw new MBeanRegistrationException(new MyScreamingException());
   }
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

      return new MBeanPermission("className", "methodName", createObjectName(), "instantiate,registerMBean");
   }

   public MBeanRegistrationException createMBeanRegistrationException()
   {
      return new MBeanRegistrationException(new NullPointerException("NullPointerException"), "MBeanRegistrationException");
   }
View Full Code Here

        synchronized (beingUnregistered) {
            while (beingUnregistered.contains(name)) {
                try {
                    beingUnregistered.wait();
                } catch (InterruptedException e) {
                    throw new MBeanRegistrationException(e, e.toString());
                    // pretend the exception came from preDeregister;
                    // in another execution sequence it could have
                }
            }
            beingUnregistered.add(name);
View Full Code Here

            throw new RuntimeErrorException((Error)t,
                    "Error thrown " + where);
        } else if (t instanceof MBeanRegistrationException) {
            throw (MBeanRegistrationException)t;
        } else if (t instanceof Exception) {
            throw new MBeanRegistrationException((Exception)t,
                    "Exception thrown " + where);
        } else // neither Error nor Exception??
            throw new RuntimeException(t);
    }
View Full Code Here

  
   }
  
   public void preDeregister() throws Exception
   {
      throw new MBeanRegistrationException(new MyScreamingException(), "you can't unregister me!");
   }
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.