Package javax.management

Examples of javax.management.InstanceNotFoundException


      {
         if (!(loaderName instanceof ObjectName)) throw new IllegalArgumentException("Environment property " + JMXConnectorServerFactory.DEFAULT_CLASS_LOADER_NAME + " must be an ObjectName");
         ObjectName name = (ObjectName)loaderName;
         try
         {
            if (!server.isInstanceOf(name, ClassLoader.class.getName())) throw new InstanceNotFoundException();
            return server.getClassLoader((ObjectName)loader);
         }
         catch (InstanceNotFoundException x)
         {
            throw new IllegalArgumentException("ObjectName " + name + " defined by environment property " + JMXConnectorServerFactory.DEFAULT_CLASS_LOADER_NAME + " must name a ClassLoader");
View Full Code Here


               if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Persistence is delegated to this MBean: " + objectName);
               return persister;
            }
            else
            {
               throw new InstanceNotFoundException(objectName.toString());
            }
         }
         catch (MalformedObjectNameException ignored)
         {
            // It does not delegates to another mbean, use default
View Full Code Here

      Logger logger = getLogger();

      synchronized (this)
      {
         TimerTask t = getTask(id);
         if (t == null) throw new InstanceNotFoundException("Cannot find notification to remove with id: " + id);
         queue.unschedule(t);
         tasks.remove(id);
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Notification " + t.getNotification() + " removed successfully from Timer service " + objectName);
      }
   }
View Full Code Here

               found = true;
            }
         }
      }

      if (!found) throw new InstanceNotFoundException("Cannot find timer notification to remove with type: " + type + " from Timer service " + objectName);
   }
View Full Code Here

                    ret_response = executor.execute(cmd, in, null);

                    elapsed = System.currentTimeMillis() - start;
                    LOG.debug(CommI18NResourceKeys.COMMAND_PROCESSOR_EXECUTED, ret_response);
                } else {
                    throw new InstanceNotFoundException(LOG.getMsgString(
                        CommI18NResourceKeys.COMMAND_PROCESSOR_UNSUPPORTED_COMMAND_TYPE, subsystem, cmdType));
                }
            } else {
                LOG.warn(CommI18NResourceKeys.COMMAND_PROCESSOR_MISSING_COMMAND);
                ret_response = new GenericCommandResponse(null, false, null, new Exception(LOG
View Full Code Here

                ObjectName directoryName = (ObjectName) names.iterator().next();

                m_directoryService = (CommandServiceDirectoryMBean) MBeanServerInvocationHandler.newProxyInstance(
                    m_mBeanServer, directoryName, CommandServiceDirectoryMBean.class, false);
            } else {
                throw new InstanceNotFoundException(LOG.getMsgString(
                    CommI18NResourceKeys.COMMAND_PROCESSOR_NO_DIRECTORY, query));
            }
        }

        return m_directoryService;
View Full Code Here

     */
    public <T> T getProxy(String mbeanName, Class<T> mbeanInterface) throws Exception {
        if (isConnected()) {
            ObjectName objectName = new ObjectName(mbeanName);
            if (!mbsc.isRegistered(objectName)) {
                throw new InstanceNotFoundException("JMX MBean " + mbeanName + " is not registered at " + jmxServiceURL);
            }

            return (T) JMX.newMBeanProxy(mbsc, objectName, mbeanInterface, true);
        } else {
            return null;
View Full Code Here

               if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Persistence is delegated to this MBean: " + objectName);
               return persister;
            }
            else
            {
               throw new InstanceNotFoundException(objectName.toString());
            }
         }
         catch (MalformedObjectNameException ignored)
         {
            // It does not delegates to another mbean, use default
View Full Code Here

      return new InstanceAlreadyExistsException("InstanceAlreadyExistsException");
   }

   public InstanceNotFoundException createInstanceNotFoundException()
   {
      return new InstanceNotFoundException("InstanceNotFoundException");
   }
View Full Code Here

    public synchronized void removeNotification(Integer id) throws InstanceNotFoundException {

        // Check that the notification to remove is effectively in the timer table.
        //
        if (timerTable.containsKey(id) == false) {
            throw new InstanceNotFoundException("Timer notification to remove not in the list of notifications");
        }

        // Stop the TimerAlarmClock.
        //
        Object[] obj = timerTable.get(id);
View Full Code Here

TOP

Related Classes of javax.management.InstanceNotFoundException

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.