Package org.mc4j.ems.connection

Examples of org.mc4j.ems.connection.EmsConnection.refresh()


        beanName += ((jmxName==null || jmxName.equals("")) ? "" : "," + jmxName);

        // This is a singleton ResourceType, so we are only looking for a single MBean.
        EmsBean emsBean = connection.getBean(beanName);
        if (emsBean == null) {
            connection.refresh();
            emsBean = connection.getBean(beanName);
        }

        if (emsBean != null) {
            Configuration conf = new Configuration();
View Full Code Here


            return null;
        }

        // EmsConnection caches the list MBeans it previously found
        // See https://bugzilla.redhat.com/show_bug.cgi?id=924903
        emsConnection.refresh();

        EmsBean runtimeMBean = emsConnection.getBean(ManagementFactory.RUNTIME_MXBEAN_NAME);
        if (runtimeMBean == null) {
            log.debug("MBean [" + ManagementFactory.RUNTIME_MXBEAN_NAME + "] not found for ["
                    + context.getParentResourceContext().getResourceKey() + "] "
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getEmsConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.tracef("Cache manager %s could be found and attributes where refreshed, so it's up.", bean);
            return AvailabilityType.UP;
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheBean();
         if (bean != null && bean.getAttribute("CacheStatus").getValue().equals(ComponentStatus.RUNNING.toString())) {
            bean.refreshAttributes();
            if (trace) log.tracef("Cache %s within %s cache manager is running and attributes could be refreshed, so it's up.", cacheName, cacheManagerName);
            return AvailabilityType.UP;
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getEmsConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache manager %s could be found and attributes where refreshed, so it's up.", bean);
            return AvailabilityType.UP;
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheBean();
         if (bean != null && bean.getAttribute("CacheStatus").getValue().equals(ComponentStatus.RUNNING.toString())) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache %s within %s cache manager is running and attributes could be refreshed, so it's up.", cacheName, cacheManagerName);
            return AvailabilityType.UP;
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheBean();
         if (bean != null && bean.getAttribute("CacheStatus").getValue().equals(ComponentStatus.RUNNING.toString())) {
            bean.refreshAttributes();
            if (trace) log.tracef("Cache %s within %s cache manager is running and attributes could be refreshed, so it's up.", cacheName, cacheManagerName);
            return AvailabilityType.UP;
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getEmsConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.tracef("Cache manager %s could be found and attributes where refreshed, so it's up.", bean);
            return AvailabilityType.UP;
View Full Code Here

    * @see org.rhq.core.pluginapi.inventory.ResourceComponent#getAvailability()
    */
   public AvailabilityType getAvailability() {
      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = conn.getBean(context.getResourceKey());
         if (bean != null)
            bean.refreshAttributes();
         return AvailabilityType.UP;
      } catch (Exception e) {
View Full Code Here

    */
   public AvailabilityType getAvailability() {
      boolean trace = log.isTraceEnabled();
      EmsConnection conn = getEmsConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache manager {0} could be found and attributes where refreshed, so it's up.", bean);
            return AvailabilityType.UP;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.