Package javax.management

Examples of javax.management.MBeanRegistrationException


public class Test4 implements Test4MBean, MBeanRegistration
{

   public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
   {
      throw new MBeanRegistrationException(new MyScreamingException());
   }
View Full Code Here


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

     */
    public ObjectName createMBean(String type, ObjectName objectName, MBeanServer mbserver) throws MBeanRegistrationException {
        try {
            return mbserver.createMBean(type,objectName).getObjectName();
        } catch (Exception ex) {
            throw new MBeanRegistrationException(ex);
        }
    }
View Full Code Here

                // last try using type type argument
                //
                try {
                    return mbserver.createMBean(type,objectName).getObjectName();
                } catch (Exception exc) {               
                    throw new MBeanRegistrationException(exc);
                }
            }
        }
    }
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

        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

        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(er,
                           "Error thrown in preRegister method");
        } catch (MBeanRegistrationException r) {
            throw r;
        } catch (Exception ex) {
            throw new MBeanRegistrationException(ex,
                          "Exception thrown in preRegister method");
        }

        if (newName != null) return newName;
        else return name;
View Full Code Here

            throw new RuntimeErrorException(er,
                         "Error thrown in preDeregister method");
        } catch (MBeanRegistrationException t) {
            throw t;
        } catch (Exception ex) {
            throw new MBeanRegistrationException(ex,
                         "Exception thrown in preDeregister method");
        }
    }
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.