Examples of Mbean


Examples of com.caucho.inject.MBean

    if (annotated.isAnnotationPresent(ManagedBean.class)){
      registerManagedBean(annotated, bean);
    }

    if (annotated.isAnnotationPresent(MBean.class)) {
      MBean mbean = annotated.getAnnotation(MBean.class);
     
      String mbeanName = mbean.value();
      if ("".equals(mbeanName))
        mbeanName = "type=" + bean.getBeanClass().getSimpleName();
     
      AnnotatedType<?> annType = (AnnotatedType<?>) annotated;
     
View Full Code Here

Examples of com.ecyrd.simplejmx.MBean

        }       
    }

    public static ObjectName getObjectName( Object o ) throws NotCompliantMBeanException
    {
        MBean mb = o.getClass().getAnnotation( MBean.class );
        if( mb != null )
        {
            try
            {
                return new ObjectName( mb.name() );
            }
            catch( Exception e ) {}
        }
       
        throw new NotCompliantMBeanException("Object must be annotated with @MBean and have a proper name attribute");
View Full Code Here

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

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

                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

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

            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

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

                                                                                                                                              
            //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

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

        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

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

        //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

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

            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

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

                                                          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
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.