Package javax.management

Examples of javax.management.InstanceAlreadyExistsException


      }

      MBeanRepository repository = getMBeanRepository();
      synchronized (repository)
      {
         if (repository.get(objectName) != null) throw new InstanceAlreadyExistsException(objectName.toString());

         repository.put(objectName, metadata);
      }
      addDomain(objectName.getDomain());
View Full Code Here


      // Create a properties -> entry map if we don't have one
      Map mbeanMap = getMBeanMap(domain, true);

      // Make sure we aren't already registered
      if (mbeanMap.get(props) != null)
         throw new InstanceAlreadyExistsException(name + " already registered.");

      // Ok, we are registered
      mbeanMap.put(props, entry);
   }
View Full Code Here

      }

      MBeanRepository repository = getMBeanRepository();
      synchronized (repository)
      {
         if (repository.get(objectName) != null) throw new InstanceAlreadyExistsException(objectName.toString());

         repository.put(objectName, metadata);
      }
      addDomain(objectName.getDomain());
View Full Code Here

      return Query.in(Query.value(4), new ValueExp[]{Query.value(3), Query.value(4), Query.value(5)});
   }

   public InstanceAlreadyExistsException createInstanceAlreadyExistsException()
   {
      return new InstanceAlreadyExistsException("InstanceAlreadyExistsException");
   }
View Full Code Here

            } else {
                // Add instance if not already present
                String cstr = name.getCanonicalKeyPropertyListString();
                NamedObject elmt= moiTb.get(cstr);
                if (elmt != null) {
                    throw new InstanceAlreadyExistsException(name.toString());
                } else {
                    nbElements++;
                    addMoiToTb(object,name,cstr,moiTb,context);
                }
            }
View Full Code Here

        ObjectName existing = mxbeanToObjectName.get(mxbean);
        if (existing != null) {
            String multiname = AccessController.doPrivileged(
                    new GetPropertyAction("jmx.mxbean.multiname"));
            if (!"true".equalsIgnoreCase(multiname)) {
                throw new InstanceAlreadyExistsException(
                        "MXBean already registered with name " + existing);
            }
        }
        mxbeanToObjectName.put(mxbean, name);
    }
View Full Code Here

        } else {
            // Add instance if not already present
            String cstr = name.getCanonicalKeyPropertyListString();
            NamedObject elmt= moiTb.get(cstr);
            if (elmt != null) {
                throw new InstanceAlreadyExistsException(name.toString());
            } else {
                nbElements++;
                moiTb.put(cstr, new NamedObject(name, object));
            }
        }
View Full Code Here

        ObjectName existing = mxbeanToObjectName.get(mxbean);
        if (existing != null) {
            String multiname = AccessController.doPrivileged(
                    new GetPropertyAction("jmx.mxbean.multiname"));
            if (!"true".equalsIgnoreCase(multiname)) {
                throw new InstanceAlreadyExistsException(
                        "MXBean already registered with name " + existing);
            }
        }
        mxbeanToObjectName.put(mxbean, name);
    }
View Full Code Here

            } else {
                // Add instance if not already present
                String cstr = name.getCanonicalKeyPropertyListString();
                NamedObject elmt= moiTb.get(cstr);
                if (elmt != null) {
                    throw new InstanceAlreadyExistsException(name.toString());
                } else {
                    nbElements++;
                    addMoiToTb(object,name,cstr,moiTb,context);
                }
            }
View Full Code Here

        ObjectName existing = mxbeanToObjectName.get(mxbean);
        if (existing != null) {
            String multiname = AccessController.doPrivileged(
                    new GetPropertyAction("jmx.mxbean.multiname"));
            if (!"true".equalsIgnoreCase(multiname)) {
                throw new InstanceAlreadyExistsException(
                        "MXBean already registered with name " + existing);
            }
        }
        mxbeanToObjectName.put(mxbean, name);
    }
View Full Code Here

TOP

Related Classes of javax.management.InstanceAlreadyExistsException

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.