Package javax.management

Examples of javax.management.MBeanException


     */
    public void store() throws InstanceNotFoundException,
        MBeanException, RuntimeOperationsException {

        // XXX if a context was set, use it to store the data
        throw new MBeanException
            (new IllegalStateException("Persistence is not supported"),
             "Persistence is not supported");

    }
View Full Code Here


        Object result = null;
        try {
            Connector connector = (Connector) getManagedResource();
            result = IntrospectionUtils.getProperty(connector, name);
        } catch (InstanceNotFoundException e) {
            throw new MBeanException(e);
        } catch (InvalidTargetObjectTypeException e) {
            throw new MBeanException(e);
        }

        return result;

    }
View Full Code Here

        try {
            Connector connector = (Connector) getManagedResource();
            IntrospectionUtils.setProperty(connector, name, String.valueOf(value));
        } catch (InstanceNotFoundException e) {
            throw new MBeanException(e);
        } catch (InvalidTargetObjectTypeException e) {
            throw new MBeanException(e);
        }
 
    }
View Full Code Here

         }
      }

      if (opInfo == null) {
         final String msg = "Operation " + name + " not in ModelMBeanInfo";
         throw new MBeanException(new ServiceNotFoundException(msg), msg);
      }

      try {
         Class<?>[] classes = new Class[sig.length];
         for (int i = 0; i < classes.length; i++) {
            classes[i] = getClassForName(sig[i]);
         }
         Method method = getObject().getClass().getMethod(name, classes);
         return method.invoke(getObject(), args);
      } catch (Exception e) {
         throw new MBeanException(e);
      }
   }
View Full Code Here

         }
      }

      if (opInfo == null) {
         final String msg = "Operation " + name + " not in ModelMBeanInfo";
         throw new MBeanException(new ServiceNotFoundException(msg), msg);
      }

      try {
         Class<?>[] classes = new Class[sig.length];
         for (int i = 0; i < classes.length; i++) {
            classes[i] = getClassForName(sig[i]);
         }
         Method method = getObject().getClass().getMethod(name, classes);
         return method.invoke(getObject(), args);
      } catch (Exception e) {
         throw new MBeanException(e);
      }
   }
View Full Code Here

         Method method = getObject().getClass().getMethod(name, classes);
         return method.invoke(getObject(), args);
      }
      catch (Exception e)
      {
         throw new MBeanException(e);
      }
   }
View Full Code Here

         }
      }

      if (opInfo == null) {
         final String msg = "Operation " + name + " not in ModelMBeanInfo";
         throw new MBeanException(new ServiceNotFoundException(msg), msg);
      }

      try {
         Class<?>[] classes = new Class[sig.length];
         for (int i = 0; i < classes.length; i++) {
            classes[i] = getClassForName(sig[i]);
         }
         Method method = getObject().getClass().getMethod(name, classes);
         return method.invoke(getObject(), args);
      } catch (Exception e) {
         throw new MBeanException(e);
      }
   }
View Full Code Here

            } else if (actionName.equals(OP_DUMP_STATE)) {
                return RepInternal.getRepImpl
                    ((ReplicatedEnvironment) env).dumpState();
            }
        } catch (DatabaseException e) {
            throw new MBeanException(new RuntimeException(e.getMessage()));
        }

        return super.invoke(actionName, params, signature);
    }
View Full Code Here

            /*
             * Add the message for easiest deciphering of the problem. Since
             * the original exception cannot be transferred, send the exception
             * stack.
             */
             throw new MBeanException(new RuntimeException
                                      (e.getMessage() +
                                       LoggerUtils.getStackTrace(e)));
        } catch (NullPointerException e) {
            throw new MBeanException(e, e.getMessage());
        }
    }
View Full Code Here

            /*
             * Add both the message and the exception for easiest deciphering
             * of the problem. Sometimes the original exception stacktrace gets
             * hidden in server logs.
             */
            throw new MBeanException(e, e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of javax.management.MBeanException

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.