Package javax.management

Examples of javax.management.RuntimeMBeanException


    }

    private static void throwMBeanRegistrationException(Throwable t, String where)
    throws MBeanRegistrationException {
        if (t instanceof RuntimeException) {
            throw new RuntimeMBeanException((RuntimeException)t,
                    "RuntimeException thrown " + where);
        } else if (t instanceof Error) {
            throw new RuntimeErrorException((Error)t,
                    "Error thrown " + where);
        } else if (t instanceof MBeanRegistrationException) {
View Full Code Here


                ((MBeanRegistration) mbean).postRegister(registrationDone);
        } catch (RuntimeException e) {
            MBEANSERVER_LOGGER.fine("While registering MBean ["+logicalName+
                    "]: " + "Exception thrown by postRegister: " +
                    "rethrowing <"+e+">, but keeping the MBean registered");
            throw new RuntimeMBeanException(e,
                      "RuntimeException thrown in postRegister method: "+
                      "rethrowing <"+e+">, but keeping the MBean registered");
        } catch (Error er) {
            MBEANSERVER_LOGGER.fine("While registering MBean ["+logicalName+
                    "]: " + "Error thrown by postRegister: " +
View Full Code Here

        } catch (RuntimeException e) {
            MBEANSERVER_LOGGER.fine("While unregistering MBean ["+mbean+
                    "]: " + "Exception thrown by postDeregister: " +
                    "rethrowing <"+e+">, although the MBean is succesfully " +
                    "unregistered");
            throw new RuntimeMBeanException(e,
                      "RuntimeException thrown in postDeregister method: "+
                      "rethrowing <"+e+
                      ">, although the MBean is sucessfully unregistered");
        } catch (Error er) {
            MBEANSERVER_LOGGER.fine("While unregistering MBean ["+mbean+
View Full Code Here

        } catch (RuntimeMBeanException e) {
            throw e;
        } catch (RuntimeErrorException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new RuntimeMBeanException(e,
                    "getMBeanInfo threw RuntimeException");
        } catch (Error e) {
            throw new RuntimeErrorException(e, "getMBeanInfo threw Error");
        }
        if (mbi == null)
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

         {
            throw new RuntimeErrorException((Error)t);
         }
         else if (t instanceof RuntimeException)
         {
            throw new RuntimeMBeanException((RuntimeException)t);
         }
         else
         {
            throw new MBeanException((Exception)t);
         }
View Full Code Here

               throw new ImplementationException();
         }
      }
      catch (RuntimeException x)
      {
         throw new RuntimeMBeanException(x);
      }
      catch (Exception x)
      {
         if (x instanceof MBeanRegistrationException)
         {
View Full Code Here

         {
            info = ((DynamicMBean)metadata.getMBean()).getMBeanInfo();
         }
         catch (RuntimeException x)
         {
            throw new RuntimeMBeanException(x);
         }
         if (info == null) return null;
         metadata.setMBeanInfo(info);
      }
View Full Code Here

         {
            throw x;
         }
         catch (RuntimeException x)
         {
            throw new RuntimeMBeanException(x);
         }
         catch (Error x)
         {
            throw new RuntimeErrorException(x);
         }
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.