Examples of MBeanRegistryEntry


Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    public ManagedConfigBean(ConfigBean cb, String xpath,
            MBeanRegistry registry, String domainName) throws Exception
    {
        if(xpath==null)
            xpath = cb.getAbsoluteXPath("");
        MBeanRegistryEntry entry  = registry.findMBeanRegistryEntryByXPath(xpath);
        MBeanNamingDescriptor descr = entry.getNamingDescriptor();
        String[] parms = descr.extractParmListFromXPath(xpath);
        MBeanNamingInfo namingInfo = new  MBeanNamingInfo(descr, descr.getType(), parms);
       
        m_mbeanInfo = (MBeanInfo)entry.createMBeanInfo(namingInfo, domainName);
        m_baseConfigBean = cb;
        m_configContext = cb.getConfigContext();
        m_registry = registry;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

            return null;
        String xpath = MBeanHelper.getXPathPattern( (ModelMBeanInfo)m_mbeanInfo) +
                           ServerXPathHelper.XPATH_SEPARATOR + childName;
        Class cl = ConfigMBeanHelper.getConfigBeanClass(xpath);
        ConfigBean bean = (ConfigBean)cl.newInstance();
        MBeanRegistryEntry regEntry = m_registry.findMBeanRegistryEntryByXPathPattern(xpath);
        if(childValues!=null)
            for(int i=0; i<childValues.size(); i++)
            {
               
                Attribute attr = (Attribute)childValues.get(i);
                if( (attr.getValue()==null || attr.getValue().equals("")))
                { 
                    //empty value set bypass if not allowed in the registry
                    boolean bEmptyValueAllowed = false;
                    try {
                       // analyze registry_Entry emptyValueAllowed (if mentioned)
                       bEmptyValueAllowed = regEntry.isAttributeEmptyValueAllowed(attr.getName());
                    } catch (MBeanMetaException mme)
                    {
                        //field not found in registry
                    }
                    if(!bEmptyValueAllowed)
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    public static ObjectName getOwnObjectName(MBeanRegistry registry, ModelMBeanInfo parentInfo) throws Exception
    {
        Descriptor descr = parentInfo.getMBeanDescriptor();
        String type = (String)descr.getFieldValue(NMTYPE_FIELD_NAME);
        String[] location = (String[])descr.getFieldValue(NMLOCATION_FIELD_NAME);
        MBeanRegistryEntry entry = registry.findMBeanRegistryEntryByType(type);
        MBeanNamingDescriptor namingDescr = entry.getNamingDescriptor();
        return namingDescr.createObjectName(location);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    }
    //********************************************************************************************************************
    public static ObjectName getConfigBeanObjectName(MBeanRegistry registry, String domainName, ConfigBean childBean) throws Exception
    {
        String xpath = childBean.getAbsoluteXPath("");
        MBeanRegistryEntry entry = registry.findMBeanRegistryEntryByXPath(xpath);
        MBeanNamingDescriptor namingDescr = entry.getNamingDescriptor();
        String[] location = namingDescr.extractParmListFromXPath(xpath);
        location[0] = domainName;
        return namingDescr.createObjectName((Object[])location);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    public AttributeList getDefaultCustomProperties(String mbeanTypeName, AttributeList attributeList)
    {
        if(mbeanTypeName==null)
            return null;
        try {
            MBeanRegistryEntry entry = m_registry.findMBeanRegistryEntryByType(mbeanTypeName);
            MBeanNamingDescriptor descr = entry.getNamingDescriptor();
            String className = descr.getMBeanClassName();
            Class cl = Class.forName(className);
            Method method = cl.getDeclaredMethod("getDefaultCustomProperties", new Class[]{Class.forName("javax.management.AttributeList")});
            return (AttributeList)method.invoke(null, new Object[]{attributeList});
        } catch (Exception e)
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    public AttributeList getDefaultAttributeValues(String mbeanTypeName, String attrNames[])
    {
        if(mbeanTypeName==null)
            return null;
        try {
            MBeanRegistryEntry entry = m_registry.findMBeanRegistryEntryByType(mbeanTypeName);
            if(attrNames==null)
            {
                attrNames = entry.getAttributeNames();
                if(attrNames==null || attrNames.length<1)
                    return null;
            }
            MBeanNamingDescriptor descr = entry.getNamingDescriptor();
            String className = descr.getMBeanClassName();
            Class cl = Class.forName(className);
            Method method = null;
            try {
                method = cl.getDeclaredMethod("getDefaultAttributeValues", new Class[]{(new String[0]).getClass()});
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    protected ObjectName getChild(String    type,
                                  String[]  location,
                                  Target    target) throws MBeanException
    {
        final MBeanRegistryEntry entry = getMBeanRegistryEntry(type);
        final MBeanNamingInfo namingInfo = getMBeanNamingInfo(entry, type,
                    getObjectNameTokens(target, location));
        doPersistenceCheck(namingInfo, getConfigContext());
        final ObjectName on = getObjectName(namingInfo);
        postInvoke("getChild", on);
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    private MBeanRegistryEntry getMBeanRegistryEntry(String type)
        throws MBeanException
    {
       
        MBeanRegistryEntry entry = null;
        try
        {
            entry = getMBeanRegistry().findMBeanRegistryEntryByType(type);
        }
        catch (Exception e)
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

            return null;
        // instantiate the proper Event
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        // 1. get event name

        MBeanRegistryEntry  entry = getRegistryEntry(xpath0);
        if(entry==null)
            return null;

        String              eventName = entry.getElementChangeEventName();
        if(eventName!=null && eventName.indexOf('.')<0)
            eventName = EVENT_PACKAGE_PATH_PREFIX + eventName;
        if(eventName==null)
            return null; //element is not a subject for ElementChangeEvent

        //  2. instantiate event
        try {
           return ElementChangeEventsFactory.createEvents(eventName, instanceName,
                      entry.getName(), changeList, domainContext, globalChangeList);
        } catch(Exception e)
        {
            e.printStackTrace();
            String msg = localStrings.getString( "admin.event.cannot_create_eventforchange", eventName, xpath0 );
            throw new IllegalArgumentException( msg );
View Full Code Here

Examples of com.sun.enterprise.admin.meta.MBeanRegistryEntry

    private synchronized MBeanRegistryEntry getRegistryEntry(String xpath)
    {
        if(xpath.equals(lastXpath))
            return lastEntry;
        MBeanRegistry       registry = MBeanRegistryFactory.getAdminMBeanRegistry();
        MBeanRegistryEntry  entry = registry.findMBeanRegistryEntryByXPath(xpath);
        if(entry!=null)
        {
            lastXpath = xpath;
            lastEntry = entry;
        }
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.