Package javax.management

Examples of javax.management.InstanceNotFoundException


    public ClassLoader getClassLoaderFor(ObjectName objectName) throws InstanceNotFoundException {
        try {
            return kernel.getClassLoaderFor(objectName);
        } catch (GBeanNotFoundException e) {
            throw new InstanceNotFoundException(objectName.getCanonicalName());
        }
    }
View Full Code Here


    // Check if there is a notification.
    synchronized(notifications)
    {
       RegisteredNotification rn = (RegisteredNotification) notifications.get(id);
       if (rn == null)
         throw new InstanceNotFoundException("No notification id : " +
                                          id.toString());

       // Remove the notification
       rn.setScheduler(null);
       notifications.remove(id);
View Full Code Here

       }
    }

    // The spec says to through an exception when nothing removed.
    if (found == false)
      throw new InstanceNotFoundException("Nothing registered for type: " +
                                          type);
  }
View Full Code Here

    ObjectName contextName = new ObjectName(DOMAIN_NAME
        + ":j2eeType=WebModule,name=//" + host + httpContext
        + ",*");
    Set engines = mbeanServer.queryNames(contextName, null);
    if (engines.isEmpty()) {
      throw new InstanceNotFoundException("HttpContext:" + httpContext + "not found");
    }
    contextName = (ObjectName) engines.iterator().next();
    mbeanServer.invoke(contextName, "destroy", new Object[] {},
        new String[] {});

View Full Code Here

       throws InstanceNotFoundException
    {
       MBeanEntry entry = registry.get(name);
       Object cl = entry.getResourceInstance();
       if ((cl instanceof ClassLoader) == false)
          throw new InstanceNotFoundException("Not a classloader " + name);
       return (ClassLoader) cl;
    }
View Full Code Here

   public MBeanEntry get(ObjectName name)
      throws InstanceNotFoundException
   {
      if (name == null)
         throw new InstanceNotFoundException("null object name");
        
      // Determine the domain and retrieve its entries
      String domain = name.getDomain();
     
      if (domain.length() == 0)
         domain = defaultDomain;
     
      String props = name.getCanonicalKeyPropertyListString();
      Map mbeanMap = getMBeanMap(domain, false);

      // Retrieve the mbean entry
      Object o = null;
      if (null == mbeanMap || null == (o = mbeanMap.get(props)))
         throw new InstanceNotFoundException(name + " is not registered.");

      // We are done
      return (MBeanEntry) o;
   }
View Full Code Here

   public ObjectInstance getObjectInstance(ObjectName name)
      throws InstanceNotFoundException
   {
      if (!contains(name))
         throw new InstanceNotFoundException(name + " not registered.");

      return new ServerObjectInstance(qualifyName(name),
         get(name).getResourceClassName(), delegate.getMBeanServerId());
   }
View Full Code Here

      String props = name.getCanonicalKeyPropertyListString();
      Map mbeanMap = getMBeanMap(domain, false);

      // Remove the entry, raise an exception when it didn't exist
      if (null == mbeanMap || null == mbeanMap.remove(props))
         throw new InstanceNotFoundException(name + " not registered.");
   }
View Full Code Here

         {
            return (ClassLoader)metadata.getMBean();
         }
         else
         {
            throw new InstanceNotFoundException(name.getCanonicalName());
         }
      }
   }
View Full Code Here

            metadata = repository.get(objectName);
         }
      }
      if (metadata == null)
      {
         throw new InstanceNotFoundException("MBeanServer cannot find MBean with ObjectName " + objectName);
      }
      return metadata;
   }
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.