Examples of DDBean


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

        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

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

    }

    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

            }
        }
    }

    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

        assertNull(root.getText("foo"));
        assertTrue(Arrays.equals(new String[] {"Test DD for app-client1"}, root.getText("application-client/description")));
        assertTrue(Arrays.equals(new String[] {"http://localhost"}, root.getText("application-client/env-entry/env-entry-value")));
        assertTrue(Arrays.equals(new String[] {"url/test1", "url/test2"}, root.getText("application-client/env-entry/env-entry-name")));

        DDBean description = root.getChildBean("application-client/description")[0];
        assertEquals("Test DD for app-client1", description.getText());
        assertEquals("application-client/description", description.getXpath());
        assertEquals(description, description.getChildBean("/application-client/description")[0]);
    }
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

Examples of javax.enterprise.deploy.model.DDBean

    }

    void initialize(GerAdminobjectInstanceType xmlObject, AdminObjectDConfigBean parent) {
        setXmlObject(xmlObject);
        this.parent = parent;
        DDBean parentDDBean = parent.getDDBean();
        configListener = ConfigPropertiesHelper.initialize(parentDDBean, new ConfigPropertiesHelper.ConfigPropertiesSource() {
            public GerConfigPropertySettingType[] getConfigPropertySettingArray() {
                return getAdminobjectInstance().getConfigPropertySettingArray();
            }
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.