List of usage examples for javax.management InstanceNotFoundException InstanceNotFoundException
public InstanceNotFoundException(String message)
From source file:org.opennms.netmgt.eventd.adaptors.EventHandlerMBeanProxy.java
private void findServer() throws InstanceNotFoundException { for (final MBeanServer sx : findMBeanServers()) { try {//from w w w . j a v a 2 s.c om if (sx.getObjectInstance(m_listener) != null) { m_mbserver = sx; break; } } catch (final InstanceNotFoundException e) { // do nothing } } if (m_mbserver == null) { throw new InstanceNotFoundException("could not locate mbean server instance"); } }
From source file:be.fgov.kszbcss.rhq.websphere.mbean.MBeanClient.java
private ObjectName internalGetObjectName() throws JMException, ConnectorException, InterruptedException { if (log.isDebugEnabled()) { log.debug("Attempting to resolve " + locator); }/*ww w .jav a 2 s .co m*/ Set<ObjectName> objectNames = locator.queryNames(server); if (log.isDebugEnabled()) { log.debug("Result: " + objectNames); } int size = objectNames.size(); if (size == 1) { return objectNames.iterator().next(); } else { throw new InstanceNotFoundException((size == 0 ? "No MBean" : "Mutiple MBeans") + " found for locator " + locator + " (process=" + server.getServer() + ", node=" + server.getNode() + ", cell=" + server.getCell() + ")"); } }
From source file:org.jolokia.handler.list.MBeanInfoData.java
/** * Add an exception which occurred during extraction of an {@link MBeanInfo} for * a certain {@link ObjectName} to this map. * * @param pName MBean name for which the error occurred * @param pExp exception occurred//from www .j a v a2 s. co m * @throws IllegalStateException if this method decides to rethrow the exception */ public void handleException(ObjectName pName, InstanceNotFoundException pExp) throws InstanceNotFoundException { // This happen happens for JBoss 7.1 in some cases (i.e. ResourceAdapterModule) if (pathStack.size() == 0) { addException(pName, pExp); } else { throw new InstanceNotFoundException( "InstanceNotFoundException for MBean " + pName + " (" + pExp.getMessage() + ")"); } }
From source file:com.adaptris.core.runtime.AdapterRegistry.java
@Override public ObjectName getBuilder(ObjectName p) throws InstanceNotFoundException { AdapterBuilder b = builderByObjectName.get(p); if (b == null) { throw new InstanceNotFoundException("No Builder for " + p); }//from w w w.j av a 2 s. com return b.createObjectName(); }
From source file:com.adaptris.core.runtime.AdapterRegistry.java
@Override public AdapterBuilderMBean getBuilderMBean(ObjectName p) throws InstanceNotFoundException { AdapterBuilderMBean b = builderByObjectName.get(p); if (b == null) { throw new InstanceNotFoundException("No Builder for " + p); }// ww w . ja v a 2 s. co m return b; }
From source file:com.adaptris.core.runtime.AdapterRegistry.java
@Override public AdapterBuilderMBean getBuilder(Properties p) throws InstanceNotFoundException { AdapterBuilder b = builderByProps.get(p); if (b == null) { throw new InstanceNotFoundException("No Builder for " + p); }//w w w. j a v a 2s. co m return b; }