Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Mbean


    private void sendAlert(long numMsgs, int threshold) {
       
        String alertMsg =  sm.getString("nummsgs.exceeds.threshold", numMsgs, threshold);
        if (alertRef != null) {
            try {
                Mbean definedMBean = ServerBeansFactory.getMBeanDefinition(
                        ApplicationServer.getServerContext().getConfigContext(), alertRef);
                ObjectName objName =
                        CustomMBeanRegistrationImpl.getCascadingAwareObjectName(definedMBean);
                Object[] params = new Object[2];
                String[] signature = new String[2];
View Full Code Here


                ServerContext srCtx = ApplicationServer.getServerContext();
                ConfigContext cfgCtx = srCtx.getConfigContext();
       
                Domain domain = ServerBeansFactory.getDomainBean(cfgCtx);
                Applications apps = domain.getApplications();
                Mbean definedMBean = apps.getMbeanByName(alertRef);
                ObjectName objName =
                    CustomMBeanRegistrationImpl.getCascadingAwareObjectName(
                                                                  definedMBean);
                Object[] params = new Object[2];
                String[] signature = new String[2];
View Full Code Here

            try {
                Domain domain = ServerBeansFactory.getDomainBean(configCtx);
                ApplicationRef appRef = verifyMBean(mBeanName, domain);
                if (appRef != null) {
                    Applications apps = domain.getApplications();
                    Mbean definedMBean = apps.getMbeanByName(mBeanName);
                    if(definedMBean != null) {
                        objName = definedMBean.getObjectName();
                        cascadedObjName = getCascadingAwareObjectName(new ObjectName(objName)).toString();
                    }
                }
            } catch(ConfigException ex) {
                _logger.log(Level.INFO, "An unexpected exception occured.", ex);
View Full Code Here

                                                                                                                                              
            //should have obtained the app reference, if all well
            if (appRef != null) {
                //check there exists a definition
                Applications apps = domain.getApplications();
                Mbean definedMBean = apps.getMbeanByName(mBeanName);
                if (definedMBean == null ) {
                    appRef = null;
                }
            }
        } catch (ConfigException ex) {
View Full Code Here

        for (final ConfigAdd added : list)  {
            final String xp = added.getXPath();
            if (xp != null) {
                final Object co = rcc.exactLookup(xp);
                if (co instanceof Mbean) {
                    final Mbean     am = (Mbean)co;
                    final String   icn = am.getImplClassName();
                    synchronizeClass(icn, rcc);
                }
            }
        }
    }
View Full Code Here

        //mutate the passed params
        params.put(CustomMBeanConstants.NAME_KEY, name);
        params.put(CustomMBeanConstants.OBJECT_NAME_KEY, onPostReg.toString());
        if (ServerBeansFactory.getMBeanDefinition(this.acc, name) == null) {
            checkObjectNameUniquenessForSameTarget(target, onPostReg);
            final Mbean md = MBeanValidator.toMbean(params, attributes, true);
            ServerBeansFactory.addMbeanDefinition(this.acc, md);
            definitionCreated = true;
        }
        else {
            final String msg = CMBStrings.get("cmb.ee.defExists", name);
View Full Code Here

            throw new RuntimeException(e);
        }
    }
   
    private void createMBeanReferenceForServer(final String target, final String ref) throws Exception {
        Mbean m = null;
        m = ServerBeansFactory.getMBeanDefinition(this.acc, ref);
        if (m == null) {
            final String msg = CMBStrings.get("cmb.ee.local.mustCreateDefinition", ref);
            throw new CustomMBeanException(msg);
        }
View Full Code Here

                                                          ctxToUse);
      
      
                if (appRef != null) {
                    Applications apps = domain.getApplications();
                    Mbean definedMBean = apps.getMbeanByName(actionMBeanName);   
               
                  
                    if (appRef.isEnabled() && definedMBean.isEnabled() ) {
                        if ((definedMBean.getObjectType()).equals(USER_DEFINED_TYPE)) {
                            actionObjName = registerAction(ruleEvent,actionMBeanName,
                                                           definedMBean,false, handback);
                        } else {
                            // system defined, need to explictly load
                            actionObjName = registerAction(ruleEvent,actionMBeanName,
View Full Code Here

       
            //should have obtained the app reference, if all well
            if (appRef != null) {
                //check there exists a definition
                Applications apps = domain.getApplications();
                Mbean definedMBean = apps.getMbeanByName(actionMBeanName);
                if (definedMBean == null ) {
                    appRef = null;
                }
            }
        } catch (ConfigException ex) {
View Full Code Here

          ApplicationRef appRef = verifyActionMBean(actionMBeanName, domain, ctxToUse);


          if (appRef != null) {
              Applications apps = domain.getApplications();
              Mbean definedMBean = apps.getMbeanByName(actionMBeanName);


              if (appRef.isEnabled() && definedMBean.isEnabled() ) {
                  if ((definedMBean.getObjectType()).equals(USER_DEFINED_TYPE)) {
                      actionObjName = registerAction(ruleEvent,actionMBeanName,
                                                     definedMBean,false,null);
                  } else {
                      // system defined, need to explictly load
                      actionObjName = registerAction(ruleEvent,actionMBeanName,
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Mbean

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.