Package javax.enterprise.deploy.model

Examples of javax.enterprise.deploy.model.DDBean


    }

    void initialize(GerConnectiondefinitionInstanceType xmlObject, ConnectionDefinitionDConfigBean parent) {
        setXmlObject(xmlObject);
        this.parent = parent;
        DDBean parentDDBean = parent.getDDBean();
        configListener = ConfigPropertiesHelper.initialize(parentDDBean, new ConfigPropertiesHelper.ConfigPropertiesSource() {
            public GerConfigPropertySettingType[] getConfigPropertySettingArray() {
                return getConnectiondefinitionInstance().getConfigPropertySettingArray();
            }
View Full Code Here


    public static String createDeploymentPlan(PortletRequest request, WARConfigData data, URL WarUrl)
            throws IOException, DDBeanCreateException, InvalidModuleException, ConfigurationException, DeploymentManagerCreationException {
        WebDeployable webDeployable = new WebDeployable(WarUrl);
        DDBeanRoot ddBeanRoot = webDeployable.getDDBeanRoot();
        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];

        Kernel kernel = PortletManager.getKernel();
        DeploymentFactory factory = new DeploymentFactoryWithKernel(kernel);
        DeploymentManager deploymentManager = factory.getDeploymentManager("deployer:geronimo:inVM", null, null);
        DeploymentConfiguration deploymentConfiguration = deploymentManager.createConfiguration(webDeployable);
View Full Code Here

        GerConnectionDefinitionType[] connectionDefinitions = outboundResourceadapter.getConnectionDefinitionArray();

        if (connectionDefinitions.length == 0) {
            //we are new
            for (int i = 0; i < connectionDefinitionDDBeans.length; i++) {
                DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
                GerConnectionDefinitionType connectionDefinition = outboundResourceadapter.addNewConnectionDefinition();
                String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
                ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean, connectionDefinition);
                connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
            }
        } else {
            //we are read in from xml.  Check correct length
            assert connectionDefinitionDDBeans.length == connectionDefinitions.length;
            for (int i = 0; i < connectionDefinitionDDBeans.length; i++) {
                DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
                GerConnectionDefinitionType connectionDefinition = connectionDefinitions[i];
                String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
                assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface());
                ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean, connectionDefinition);
                connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
            }
        }
View Full Code Here

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

        }
        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

        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

            }
            DDBean[] definitions = ddBeanRoot.getChildBean("connector/resourceadapter/outbound-resourceadapter/connection-definition");
            List configs = new ArrayList();
            if(definitions != null) {
                for (int i = 0; i < definitions.length; i++) {
                    DDBean definition = definitions[i];
                    String iface = definition.getText("connectionfactory-interface")[0];
                    if(iface.equals("javax.sql.DataSource")) {
                        DDBean[] beans = definition.getChildBean("config-property");
                        for (int j = 0; j < beans.length; j++) {
                            DDBean bean = beans[j];
                            String name = bean.getText("config-property-name")[0].trim();
                            String type = bean.getText("config-property-type")[0].trim();
                            test = bean.getText("config-property-value");
                            String value = test == null || test.length == 0 ? null : test[0].trim();
                            test = bean.getText("description");
                            String desc = test == null || test.length == 0 ? null : test[0].trim();
                            configs.add(new ConfigParam(name, type, desc, value));
                        }
                    }
                }
View Full Code Here

            }
        }
    }

    private void replaceResourceAdapterDConfigBean(GerResourceadapterType resourceAdapter) {
        DDBean ddBean = getDDBean();
        String path = getXpaths()[0];
        System.out.println("********** Searching XPath "+path+" -- "+ddBean.getChildBean(path));
        DDBean childDDBean = ddBean.getChildBean(path)[0];
        resourceAdapterDConfigBean = new ResourceAdapterDConfigBean(childDDBean, resourceAdapter);
    }
View Full Code Here

                            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

    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

TOP

Related Classes of javax.enterprise.deploy.model.DDBean

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.