Examples of GerAdminobjectInstanceType


Examples of org.apache.geronimo.xbeans.connector.GerAdminobjectInstanceType

        AdminObjectInstance[] old = getAdminObjectInstance();
        this.instances = instances;
        for (int i = 0; i < instances.length; i++) { // catch additions
            AdminObjectInstance instance = instances[i];
            if (!instance.hasParent()) {
                GerAdminobjectInstanceType xmlObject = getAdminObject().addNewAdminobjectInstance();
                instance.initialize(xmlObject, this);
            }
        }
        for (int i = 0; i < old.length; i++) { // catch removals
            AdminObjectInstance instance = old[i];
            boolean found = false;
            for (int j = 0; j < instances.length; j++) {
                if (instances[j] == instance) {
                    found = true;
                    break;
                }
            }
            if (!found) {
                // remove the XmlBean
                for (int j = 0; j < getAdminObject().getAdminobjectInstanceArray().length; j++) {
                    GerAdminobjectInstanceType test = getAdminObject().getAdminobjectInstanceArray(j);
                    if (test == instance.getAdminobjectInstance()) {
                        getAdminObject().removeAdminobjectInstance(j);
                        break;
                    }
                }
View Full Code Here

Examples of org.apache.geronimo.xbeans.connector.GerAdminobjectInstanceType

                    if(admin.getAdminobjectInstanceArray().length > 0) {
                        GerAdminobjectType old = dcb.getAdminObject();
                        GerAdminobjectInstanceType[] array = admin.getAdminobjectInstanceArray();
                        int oldCount = dcb.getAdminObjectInstance().length;
                        for (int j = 0; j < array.length; j++) {
                            GerAdminobjectInstanceType instance = array[j];
                            XmlCursor source = instance.newCursor();
                            XmlCursor dest = old.newCursor();
                            dest.toEndToken();
                            if(!source.moveXml(dest)) {
                                throw new RuntimeException("Unable to move admin object instance");
                            }
View Full Code Here

Examples of org.apache.geronimo.xbeans.connector.GerAdminobjectInstanceType

                    if(admin.getAdminobjectInstanceArray().length > 0) {
                        GerAdminobjectType old = dcb.getAdminObject();
                        GerAdminobjectInstanceType[] array = admin.getAdminobjectInstanceArray();
                        int oldCount = dcb.getAdminObjectInstance().length;
                        for (int j = 0; j < array.length; j++) {
                            GerAdminobjectInstanceType instance = array[j];
                            XmlCursor source = instance.newCursor();
                            XmlCursor dest = old.newCursor();
                            dest.toEndToken();
                            if(!source.moveXml(dest)) {
                                throw new RuntimeException("Unable to move admin object instance");
                            }
View Full Code Here

Examples of org.apache.geronimo.xbeans.connector.GerAdminobjectInstanceType

        AdminObjectInstance[] old = getAdminObjectInstance();
        this.instances = instances;
        for (int i = 0; i < instances.length; i++) { // catch additions
            AdminObjectInstance instance = instances[i];
            if (!instance.hasParent()) {
                GerAdminobjectInstanceType xmlObject = getAdminObject().addNewAdminobjectInstance();
                instance.initialize(xmlObject, this);
            }
        }
        for (int i = 0; i < old.length; i++) { // catch removals
            AdminObjectInstance instance = old[i];
            boolean found = false;
            for (int j = 0; j < instances.length; j++) {
                if (instances[j] == instance) {
                    found = true;
                    break;
                }
            }
            if (!found) {
                // remove the XmlBean
                for (int j = 0; j < getAdminObject().getAdminobjectInstanceArray().length; j++) {
                    GerAdminobjectInstanceType test = getAdminObject().getAdminobjectInstanceArray(j);
                    if (test == instance.getAdminobjectInstance()) {
                        getAdminObject().removeAdminobjectInstance(j);
                        break;
                    }
                }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType

        AdminObjectInstance[] old = getAdminObjectInstance();
        this.instances = instances;
        for (int i = 0; i < instances.length; i++) { // catch additions
            AdminObjectInstance instance = instances[i];
            if (!instance.hasParent()) {
                GerAdminobjectInstanceType xmlObject = getAdminObject().addNewAdminobjectInstance();
                instance.initialize(xmlObject, this);
            }
        }
        for (int i = 0; i < old.length; i++) { // catch removals
            AdminObjectInstance instance = old[i];
            boolean found = false;
            for (int j = 0; j < instances.length; j++) {
                if (instances[j] == instance) {
                    found = true;
                    break;
                }
            }
            if (!found) {
                // remove the XmlBean
                for (int j = 0; j < getAdminObject().getAdminobjectInstanceArray().length; j++) {
                    GerAdminobjectInstanceType test = getAdminObject().getAdminobjectInstanceArray(j);
                    if (test == instance.getAdminobjectInstance()) {
                        getAdminObject().removeAdminobjectInstance(j);
                        break;
                    }
                }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType

            }
        }
        for (int i = 0; i < geronimoConnector.getAdminobjectArray().length; i++) {
            GerAdminobjectType gerAdminObject = geronimoConnector.getAdminobjectArray()[i];
            for (int j = 0; j < gerAdminObject.getAdminobjectInstanceArray().length; j++) {
                GerAdminobjectInstanceType gerAdminObjectInstance = gerAdminObject.getAdminobjectInstanceArray()[j];

                ObjectName adminObjectObjectName = null;
                try {
                    adminObjectObjectName = NameFactory.getComponentName(null, null, null, null, null, gerAdminObjectInstance.getMessageDestinationName(), NameFactory.JCA_ADMIN_OBJECT, resourceJ2eeContext);
                } catch (MalformedObjectNameException e) {
                    throw new DeploymentException("Could not construct resource object name", e);
                }
                GBeanData adminObjectData = new GBeanData(adminObjectObjectName, null);
                earContext.addGBean(adminObjectData);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType

                throw new DeploymentException("No admin object declared for interface: " + adminObjectInterface);
            }

            for (int j = 0; j < gerAdminObject.getAdminobjectInstanceArray().length; j++) {
                GBeanData adminObjectInstanceGBeanData = new GBeanData(adminObjectGBeanData);
                GerAdminobjectInstanceType gerAdminObjectInstance = gerAdminObject.getAdminobjectInstanceArray()[j];
                setDynamicGBeanDataAttributes(adminObjectInstanceGBeanData, gerAdminObjectInstance.getConfigPropertySettingArray(), cl);
                // add it
                ObjectName adminObjectObjectName = null;
                try {
                    adminObjectObjectName = NameFactory.getComponentName(null, null, null, null, null, gerAdminObjectInstance.getMessageDestinationName(), NameFactory.JCA_ADMIN_OBJECT, moduleJ2eeContext);
                } catch (MalformedObjectNameException e) {
                    throw new DeploymentException("Could not construct admin object object name", e);
                }
                adminObjectInstanceGBeanData.setName(adminObjectObjectName);
                earContext.addGBean(adminObjectInstanceGBeanData);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType

        AdminObjectInstance[] old = getAdminObjectInstance();
        this.instances = instances;
        for (int i = 0; i < instances.length; i++) { // catch additions
            AdminObjectInstance instance = instances[i];
            if (!instance.hasParent()) {
                GerAdminobjectInstanceType xmlObject = getAdminObject().addNewAdminobjectInstance();
                instance.initialize(xmlObject, this);
            }
        }
        for (int i = 0; i < old.length; i++) { // catch removals
            AdminObjectInstance instance = old[i];
            boolean found = false;
            for (int j = 0; j < instances.length; j++) {
                if (instances[j] == instance) {
                    found = true;
                    break;
                }
            }
            if (!found) {
                // remove the XmlBean
                for (int j = 0; j < getAdminObject().getAdminobjectInstanceArray().length; j++) {
                    GerAdminobjectInstanceType test = getAdminObject().getAdminobjectInstanceArray(j);
                    if (test == instance.getAdminobjectInstance()) {
                        getAdminObject().removeAdminobjectInstance(j);
                        break;
                    }
                }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType

                throw new DeploymentException("No admin object declared for interface: " + adminObjectInterface);
            }

            for (int j = 0; j < gerAdminObject.getAdminobjectInstanceArray().length; j++) {
                GBeanData adminObjectInstanceGBeanData = new GBeanData(adminObjectGBeanData);
                GerAdminobjectInstanceType gerAdminObjectInstance = gerAdminObject.getAdminobjectInstanceArray()[j];
                setDynamicGBeanDataAttributes(adminObjectInstanceGBeanData, gerAdminObjectInstance.getConfigPropertySettingArray(), cl);
                // add it
                AbstractName adminObjectAbstractName = earContext.getNaming().createChildName(jcaResourceName, gerAdminObjectInstance.getMessageDestinationName().trim(), NameFactory.JCA_ADMIN_OBJECT);
                adminObjectInstanceGBeanData.setAbstractName(adminObjectAbstractName);
                try {
                    earContext.addGBean(adminObjectInstanceGBeanData);
                } catch (GBeanAlreadyExistsException e) {
                    throw new DeploymentException("Could not add admin object gbean to context", e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType

                    if(admin.getAdminobjectInstanceArray().length > 0) {
                        GerAdminobjectType old = dcb.getAdminObject();
                        GerAdminobjectInstanceType[] array = admin.getAdminobjectInstanceArray();
                        int oldCount = dcb.getAdminObjectInstance().length;
                        for (int j = 0; j < array.length; j++) {
                            GerAdminobjectInstanceType instance = array[j];
                            XmlCursor source = instance.newCursor();
                            XmlCursor dest = old.newCursor();
                            dest.toEndToken();
                            if(!source.moveXml(dest)) {
                                throw new RuntimeException("Unable to move admin object instance");
                            }
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.