Package javax.management

Examples of javax.management.RuntimeMBeanException


               listener, filter, handback
         );
      }
      else
      {
         throw new RuntimeMBeanException(new IllegalArgumentException(
               "Target XXX is not a notification broadcaster"
              
               // FIXME: add the XXX object name, store from registration
         ));
      }
View Full Code Here


               listener
         );
      }
      else
      {
         throw new RuntimeMBeanException(new IllegalArgumentException(
               "Target XXX is not a notification broadcaster"
              
               // FIXME: add the XXX object name, store from registration
         ));
      }
View Full Code Here

               listener, filter, handback
         );
      }
      else
      {
         throw new RuntimeMBeanException(new IllegalArgumentException(
               "Target XXX is not a notification emitter"
              
               // FIXME: add the XXX object name, store from registration
         ));
      }
View Full Code Here

      else if (t instanceof InvocationTargetException)
      {
         Throwable root = ((InvocationTargetException)t).getTargetException();

         if (root instanceof RuntimeException)
            throw new RuntimeMBeanException((RuntimeException)root, className + " constructor has thrown an exception: " + root.toString());
         else if (root instanceof Error)
            throw new RuntimeErrorException((Error)root, className + " constructor has thrown an error: " + root.toString());
         else if (root instanceof Exception)
            throw new MBeanException((Exception)root, className + " constructor has thrown an exception: " + root.toString());

         throw new Error("Something went wrong with handling the exception from " + className + " default constructor.");
      }

      else if (t instanceof ExceptionInInitializerError)
      {
         Throwable root = ((ExceptionInInitializerError)t).getException();

         // the root cause can be only a runtime exception
         if (root instanceof RuntimeException)
            throw new RuntimeMBeanException((RuntimeException)root, "Exception in class " + className + " static initializer: " + root.toString());
         else
            // shouldn't get here
            throw new Error("ERROR: it turns out the root cause is not always a runtime exception!");
      }
View Full Code Here

         // Invoked method threw a runtime exception. We wrap it into a JMX
         // runtime mbean exception
         if (target instanceof RuntimeException)
         {
            throw new InvocationException(
                  new RuntimeMBeanException((RuntimeException)target, target.toString())
            );
         }
        
         // Invoked method threw a checked exception. Wrapped as a JMX mbean
         // exception.
View Full Code Here

      {
         exception = new MBeanException(null, message);
      }
      else if (RuntimeMBeanException.class.getName().equals(className))
      {
         exception = new RuntimeMBeanException(null, message);
      }

      if (!(exception instanceof Throwable))
      {
         Logger logger = getLogger();
View Full Code Here

         throw x;
      }
      catch (InvocationTargetException x)
      {
         Throwable t = x.getTargetException();
         if (t instanceof RuntimeException) throw new RuntimeMBeanException((RuntimeException)t);
         if (t instanceof Exception) throw new MBeanException((Exception)t);
         throw new RuntimeErrorException((Error)t);
      }
      catch (Throwable t)
      {
         if (t instanceof RuntimeException) throw new RuntimeMBeanException((RuntimeException)t);
         if (t instanceof Exception) throw new MBeanException((Exception)t);
         throw new RuntimeErrorException((Error)t);
      }
   }
View Full Code Here

      }
      catch (InvocationTargetException x)
      {
         Throwable t = x.getTargetException();
         if (t instanceof RuntimeException)
            throw new RuntimeMBeanException((RuntimeException)t);
         else if (t instanceof Exception) throw new MBeanException((Exception)t);
         throw new RuntimeErrorException((Error)t);
      }
   }
View Full Code Here

      return new RuntimeErrorException(new Error("Error"), "RuntimeErrorException");
   }

   public RuntimeMBeanException createRuntimeMBeanException()
   {
      return new RuntimeMBeanException(new NullPointerException("NullPointerException"), "RuntimeMBeanException");
   }
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

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.