Package javax.management

Examples of javax.management.RuntimeMBeanException


            moi= cons.newInstance();
        } catch (InvocationTargetException e) {
            // Wrap the exception.
            Throwable t = e.getTargetException();
            if (t instanceof RuntimeException) {
                throw new RuntimeMBeanException((RuntimeException)t,
                   "RuntimeException thrown in the MBean's empty constructor");
            } else if (t instanceof Error) {
                throw new RuntimeErrorException((Error) t,
                   "Error thrown in the MBean's empty constructor");
            } else {
View Full Code Here


        }
        catch (InvocationTargetException e) {
            // Wrap the exception.
            Throwable th = e.getTargetException();
            if (th instanceof RuntimeException) {
                throw new RuntimeMBeanException((RuntimeException)th,
                      "RuntimeException thrown in the MBean's constructor");
            } else if (th instanceof Error) {
                throw new RuntimeErrorException((Error) th,
                      "Error thrown in the MBean's constructor");
            } else {
View Full Code Here

        } catch (RuntimeOperationsException e) {
            throw e;
        } catch (RuntimeErrorException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new RuntimeMBeanException(e, e.toString());
        } catch (Error e) {
            throw new RuntimeErrorException(e, e.toString());
        } catch (Throwable t2) {
            // should not happen
            throw new RuntimeException("Unexpected exception", t2);
View Full Code Here

        final ObjectName newName;

        try {
            newName = moi.preRegister(mbs, name);
        } catch (RuntimeException e) {
                throw new RuntimeMBeanException(e,
                           "RuntimeException thrown in preRegister method");
        } catch (Error er) {
                throw new RuntimeErrorException(er,
                           "Error thrown in preRegister method");
        } catch (MBeanRegistrationException r) {
View Full Code Here

        if (registerFailed && moi instanceof DynamicMBean2)
            ((DynamicMBean2) moi).registerFailed();
        try {
            moi.postRegister(new Boolean(registrationDone));
        } catch (RuntimeException e) {
            throw new RuntimeMBeanException(e,
                      "RuntimeException thrown in postRegister method");
        } catch (Error er) {
            throw new RuntimeErrorException(er,
                      "Error thrown in postRegister method");
        }
View Full Code Here

    private static void preDeregisterInvoke(MBeanRegistration moi)
            throws MBeanRegistrationException {
        try {
            moi.preDeregister();
        } catch (RuntimeException e) {
            throw new RuntimeMBeanException(e,
                         "RuntimeException thrown in preDeregister method");
        } catch (Error er) {
            throw new RuntimeErrorException(er,
                         "Error thrown in preDeregister method");
        } catch (MBeanRegistrationException t) {
View Full Code Here

    private static void postDeregisterInvoke(MBeanRegistration moi) {
        try {
            moi.postDeregister();
        } catch (RuntimeException e) {
            throw new RuntimeMBeanException(e,
                         "RuntimeException thrown in postDeregister method");
        } catch (Error er) {
            throw new RuntimeErrorException(er,
                         "Error thrown in postDeregister method");
        }
View Full Code Here

            moi= cons.newInstance();
        } catch (InvocationTargetException e) {
            // Wrap the exception.
            Throwable t = e.getTargetException();
            if (t instanceof RuntimeException) {
                throw new RuntimeMBeanException((RuntimeException)t,
                   "RuntimeException thrown in the MBean's empty constructor");
            } else if (t instanceof Error) {
                throw new RuntimeErrorException((Error) t,
                   "Error thrown in the MBean's empty constructor");
            } else {
View Full Code Here

        }
        catch (InvocationTargetException e) {
            // Wrap the exception.
            Throwable th = e.getTargetException();
            if (th instanceof RuntimeException) {
                throw new RuntimeMBeanException((RuntimeException)th,
                      "RuntimeException thrown in the MBean's constructor");
            } else if (th instanceof Error) {
                throw new RuntimeErrorException((Error) th,
                      "Error thrown in the MBean's constructor");
            } else {
View Full Code Here

            {
               // Only throw this if preRegister succeeded
               if( invokedPreRegister == true )
               {
                  if( e instanceof RuntimeException )
                     throw new RuntimeMBeanException((RuntimeException) e);
                  else
                     throw new MBeanRegistrationException(e);
               }
            }
         }
View Full Code Here

TOP

Related Classes of javax.management.RuntimeMBeanException

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.