Examples of DDBean


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

Examples of javax.enterprise.deploy.model.DDBean

        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

Examples of javax.enterprise.deploy.model.DDBean

        GerConnectionDefinitionType connectionDefinition = getConnectorDocument().addNewConnector().addNewResourceadapter().addNewOutboundResourceadapter().addNewConnectionDefinition();
        replaceConnectionDefinitionDConfigBean(connectionDefinition);
    }

    private void replaceConnectionDefinitionDConfigBean(GerConnectionDefinitionType connectionDefinition) {
        DDBean ddBean = getDDBean();
        DDBean childDDBean = ddBean.getChildBean(getXpaths()[0])[0];
        connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(childDDBean, connectionDefinition);
    }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

            }
        }
    }

    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

Examples of javax.enterprise.deploy.model.DDBean

                return null;
            }
            String path = xpath.substring(index + 1);
            List beans = new ArrayList();
            for (Iterator i = childBeans.iterator(); i.hasNext();) {
                DDBean bean = (DDBean) i.next();
                DDBean[] childs = bean.getChildBean(path);
                if (childs != null) {
                    for (int j = 0; j < childs.length; j++) {
                        beans.add(new DDBeanImpl((DDBeanImpl) childs[j], xpath));
                    }
                }
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

            }
            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

Examples of javax.enterprise.deploy.model.DDBean

            }
            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

Examples of javax.enterprise.deploy.model.DDBean

        assertNotNull(configRoot.getDConfigBean(ddBeanRoot.getChildBean("web-app")[0]));
        assertNull(configRoot.getDConfigBean(ddBeanRoot.getChildBean("web-app/description")[0]));
    }

    public void testWebApp() throws Exception {
        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];
        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);
        assertNotNull(webApp);
/*
        String[] xpaths = webApp.getXpaths();
        assertTrue(Arrays.equals(
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

    void configure(DDBean connectionDefinition, GerConnectiondefinitionInstanceType definition) {
        this.connectionDefinition = connectionDefinition;
        super.configure(connectionDefinition, definition);
        if(connectionDefinition != null) {
            DDBean parent = connectionDefinition.getChildBean("..")[0];
            ConnectionManager oldMgr = manager;
            if(oldMgr == null) {
                if(definition.getConnectionmanager() != null) {
                    manager = new ConnectionManager(parent, definition.getConnectionmanager());
                } else {
View Full Code Here

Examples of javax.enterprise.deploy.model.DDBean

        this.resourceAdapter = resourceAdapter;
        setXmlObject(definition);
        //todo: handle unmatched interfaces below
        instances = new ConnectionDefinitionInstance[definition.getConnectiondefinitionInstanceArray().length];
        DDBean[] beans = resourceAdapter.getChildBean("outbound-resourceadapter/connection-definition");
        DDBean match = null;
        for (int i = 0; i < beans.length; i++) {
            DDBean bean = beans[i];
            if(bean.getText("connectionfactory-interface")[0].equals(definition.getConnectionfactoryInterface())) {
                match = bean;
                break;
            }
        }
        for (int i = 0; i < instances.length; i++) {
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.