Examples of DDBean


Examples of javax.enterprise.deploy.model.DDBean

    }

    public void setConnectionFactoryInterface(String iface) {
        String old = getConnectionFactoryInterface();
        getConnectionDefinition().setConnectionfactoryInterface(iface);
        DDBean match = getConnectionDefinitionDDBean();
        for (int i = 0; i < instances.length; i++) {
            ConnectionDefinitionInstance instance = instances[i];
            if(instance.getDDBean() != match) {
                instance.configure(match, instance.getConnectionInstance());
            }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

    private DDBean getConnectionDefinitionDDBean() {
        String iface = getConnectionFactoryInterface();
        if(iface == null || iface.equals("")) {
            return null;
        }
        DDBean list[] = resourceAdapter.getChildBean("outbound-resourceadapter/connection-definition");
        for (int i = 0; i < list.length; i++) {
            DDBean bean = list[i];
            String[] test = bean.getText("connectionfactory-interface");
            if(test.length > 0) {
                String myface = test[0];
                if(myface.equals(iface)) {
                    return bean;
                }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

                            dcb.addAdminObjectInstance(old.getAdminobjectInstanceArray(oldCount+j));
                        }
                    }
                    continue;
                }
                DDBean target = null;
                for (int j = 0; j < ddBeans.size(); j++) {
                    DDBean ddBean = (DDBean) ddBeans.get(j);
                    String ddClass = ddBean.getText("adminobject-class")[0];
                    String ddIface = ddBean.getText("adminobject-interface")[0];
                    if(ddClass.equals(aoClass) && ddIface.equals(aoIface)) {
                        target = ddBean;
                        ddBeans.remove(j);
                        break;
                    }
                }
                if(target == null) {
                    System.out.println("Geronimo connector deployment plan has admin object with interface '"+aoIface+"' and class '"+aoClass+"' but the ra.xml does not have a matching adminobject declared.  Deleting this adminobject from the Geronimo plan.");
                    continue;
                }
                dcb = new AdminObjectDCB(target, admin);
                dcbs.put("class "+aoClass+" iface "+aoIface, dcb);
            }
        }
        // There are some admin object types in ra.xml with no matching instances; create DConfigBeans for those
        for (int i = 0; i < ddBeans.size(); i++) {
            DDBean ddBean = (DDBean) ddBeans.get(i);
            String ddClass = ddBean.getText("adminobject-class")[0];
            String ddIface = ddBean.getText("adminobject-interface")[0];
            GerAdminobjectType admin = connector.addNewAdminobject();
            dcbs.put("class "+ddClass+" iface "+ddIface, new AdminObjectDCB(ddBean, admin));
        }
        List adminResults = new ArrayList();
        for (Iterator it = dcbs.keySet().iterator(); it.hasNext();) {
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

    /**
     * When loaded, reset the cached "connector" child
     */
    public void fromXML(InputStream inputStream) throws XmlException, IOException {
        DDBean ddb = connector.getDDBean();
        super.fromXML(inputStream);
        if(getConnectorDocument().getConnector() != null) {
            connector = new ConnectorDCB(ddb, getConnectorDocument().getConnector());
        } else {
            connector = new ConnectorDCB(ddb, getConnectorDocument().addNewConnector());
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

        }
        try {
            DDBean[] adminDDBs = connector.getDDBean().getChildBean(connector.getXpaths()[0]);
            if(adminDDBs == null) adminDDBs = new DDBean[0];
            for (int i = 0; i < adminDDBs.length; i++) {
                DDBean ddb = adminDDBs[i];
                AdminObjectDCB dcb = (AdminObjectDCB) connector.getDConfigBean(ddb);
                AdminObjectInstance[] instances = dcb.getAdminObjectInstance();
                for (int j = 0; j < instances.length; j++) {
                    AdminObjectInstance instance = instances[j];
                    parents.add(instance);
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

        if(all == null) {
            all = new DDBean[0];
        }
        Map byName = new HashMap();
        for (int i = 0; i < all.length; i++) {
            DDBean item = all[i];
            byName.put(item.getText("config-property-name")[0], item);
        }
        GerConfigPropertySettingType[] previous = getConfigProperties();
        for (int i = 0; i < previous.length; i++) {
            GerConfigPropertySettingType setting = previous[i];
            DDBean item = (DDBean) byName.remove(setting.getName());
            if(item != null) {
                list.add(new ConfigPropertySetting(item, setting, false));
            } else {
                System.out.println("Ignoring connectiondefinition-instance/config-setting "+setting.getName()+" (no matching config-property in J2EE DD)");
                //todo: delete it from the XMLBeans tree
            }
        }
        for (Iterator it = byName.keySet().iterator(); it.hasNext();) {
            String name = (String) it.next();
            DDBean bean = (DDBean) byName.get(name);
            list.add(new ConfigPropertySetting(bean, createConfigProperty(), true));
        }
        settings = (ConfigPropertySetting[]) list.toArray(new ConfigPropertySetting[list.size()]);
        if(old != null) {
            pcs.firePropertyChange("configPropertySetting", old, settings);
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

        GerWebAppType webApp = getWebAppDocument().addNewWebApp();
        replaceWebAppDConfigBean(webApp);
    }

    private void replaceWebAppDConfigBean(GerWebAppType webApp) {
        DDBean ddBean = getDDBean();
        webAppBean = new WebAppDConfigBean(ddBean.getChildBean(XPATHS[0])[0], webApp);
    }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

    public ApplicationDeployable(URL moduleURL) throws DDBeanCreateException {
        super(ModuleType.EAR, moduleURL, "META-INF/application.xml");
        DDBean[] moduleBeans = getChildBean("/application/module");
        uriMap = new HashMap(moduleBeans.length);
        for (int i = 0; i < moduleBeans.length; i++) {
            DDBean moduleBean = moduleBeans[i];
            String uri;

        }
    }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

        GerConfigPropertySettingType[] configPropertySettings = configPropertiesSource.getConfigPropertySettingArray();

        if (configPropertySettings.length == 0) {
            //we are new
            for (int i = 0; i < configProperties.length; i++) {
                DDBean configProperty = configProperties[i];
                GerConfigPropertySettingType configPropertySetting = configPropertiesSource.addNewConfigPropertySetting();
                String name = configProperty.getText(configPropertyNameXPath)[0];
                ConfigPropertySettingDConfigBean configPropertySettingDConfigBean = new ConfigPropertySettingDConfigBean(configProperty, configPropertySetting);
                configPropertiesMap.put(name, configPropertySettingDConfigBean);
            }
        } else {
            //we are read in from xml.  Check correct length
            assert configProperties.length == configPropertySettings.length;
            for (int i = 0; i < configProperties.length; i++) {
                DDBean configProperty = configProperties[i];
                GerConfigPropertySettingType configPropertySetting = configPropertySettings[i];
                String name = configProperty.getText(configPropertyNameXPath)[0];
                assert name.equals(configPropertySetting.getName());
                ConfigPropertySettingDConfigBean configPropertySettingDConfigBean = new ConfigPropertySettingDConfigBean(configProperty, configPropertySetting);
                configPropertiesMap.put(name, configPropertySettingDConfigBean);
            }
        }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

    public static XpathListener initialize(DDBean parentDDBean, final ConfigPropertiesHelper.ConfigPropertiesSource configPropertiesSource, String configPropertyXPath, String configPropertyNameXPath) {
        DDBean[] beans = parentDDBean.getChildBean(configPropertyXPath);
        ConfigPropertySettings[] configs = new ConfigPropertySettings[beans.length];
        Set xmlBeans = new HashSet(Arrays.asList(configPropertiesSource.getConfigPropertySettingArray()));
        for (int i = 0; i < beans.length; i++) {
            DDBean bean = beans[i];
            String[] names = bean.getText(configPropertyNameXPath);
            String name = names.length == 1 ? names[0] : "";
            GerConfigPropertySettingType target = null;
            for (Iterator it = xmlBeans.iterator(); it.hasNext();) {
                GerConfigPropertySettingType setting = (GerConfigPropertySettingType) it.next();
                if (setting.getName().equals(name)) {
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.