Package javax.management

Examples of javax.management.JMException


            _store.setDesignatedPrimary(primary);
        }
        catch (AMQStoreException e)
        {
            LOGGER.error("Failed to set node " + _store.getNodeName() + " as designated primary", e);
            throw new JMException(e.getMessage());
        }
    }
View Full Code Here


            _store.updateAddress(nodeName, newHostName, newPort);
        }
        catch(AMQStoreException e)
        {
            LOGGER.error("Failed to update address for node " + nodeName + " to " + newHostName + ":" + newPort, e);
            throw new JMException(e.getMessage());
        }
    }
View Full Code Here

            //ignore, likely on Java5
        }
        try {
            return new ObjectName("JMImplementation:type=MBeanServerDelegate");
        } catch (MalformedObjectNameException e) {
            JMException jme = new JMException(e.getMessage());
            jme.initCause(e);
            throw jme;
        }
    }
View Full Code Here

            (RequiredModelMBean)mbs.instantiate("javax.management.modelmbean.RequiredModelMBean");
        rtMBean.setModelMBeanInfo(mbi);
        try {
            rtMBean.setManagedResource(obj, "ObjectReference");
        } catch (InvalidTargetObjectTypeException itotex) {
            throw new JMException(itotex.getMessage());
        }
        registerMBeanWithServer(rtMBean, persist(name), forceRegistration);
    }
View Full Code Here

         Collection col = MBeanServerFactory.findMBeanServer(null);
         if(col.isEmpty())
         {

            throw new JMException("No MBeanServer found");
         }
         fMbeanServer = (MBeanServer) col.iterator().next();
      }
      return fMbeanServer;
   }
View Full Code Here

      try
      {
   ObjectInstance oi = server.getObjectInstance(repositoryName);
   if ((repositoryClassName != null) && !oi.getClassName().equals(repositoryClassName))
   {
      throw new JMException("Inconsistent LoaderRepository class specification in repository: " + repositoryName);
   } // end of if ()
      }
      catch (InstanceNotFoundException e)
      {
   //we are the first, make the repository.
   if( repositoryClassName == null )
      repositoryClassName = "org.jboss.mx.loading.HeirarchicalLoaderRepository2";
   try
   {
      // Create the repository loader
      Object[] args = {server, DEFAULT_LOADER_REPOSITORY};
      String[] sig = {"javax.management.MBeanServer", "javax.management.ObjectName"};
      server.createMBean(repositoryClassName, repositoryName,
            args, sig);
   }
   catch(Exception e2)
   {
      throw new JMException("Failed to create deployment loader repository:" + e2);
   }
      } // end of try-catch
   }
View Full Code Here

                .getName());
            mbean.setModelMBeanInfo(mbi);
            try {
                mbean.setManagedResource(obj, "ObjectReference");
            } catch (InvalidTargetObjectTypeException itotex) {
                throw new JMException(itotex.getMessage());
            }
            registerMBeanWithServer(mbean, name, forceRegistration);
        }
    }
View Full Code Here

        @ManagedOperationParameter(name = "sequenceId", description = "The sequence identifier")
    })
    public void resumeSourceQueue(String sid) throws JMException {
        SourceSequence ss = getSourceSeq(sid);
        if (null == ss) {
            throw new JMException("no source sequence");
        }
        RetransmissionQueue rq = endpoint.getManager().getRetransmissionQueue();
        rq.resume(ss);
    }
View Full Code Here

    public String getCurrentSourceSequenceId() throws JMException {
        Source source = endpoint.getSource();
        SourceSequence ss = source.getCurrent();

        if (null == ss) {
            throw new JMException("no source sequence");
        }
       
        return ss.getIdentifier().getValue();
    }
View Full Code Here

        @ManagedOperationParameter(name = "sequenceId", description = "The destination identifier")
    })
    public void removeSourceSequence(String sid) throws JMException {
        SourceSequence ss = getSourceSeq(sid);
        if (null == ss) {
            throw new JMException("no source sequence");
        }
        //TODO use cancel insted of suspend
        RetransmissionQueue rq = endpoint.getManager().getRetransmissionQueue();
        rq.suspend(ss);
        ss.getSource().removeSequence(ss);
View Full Code Here

TOP

Related Classes of javax.management.JMException

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.