Package javax.enterprise.deploy.model

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


    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

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

                            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(Bundle bundle) throws DDBeanCreateException {
        super(ModuleType.EAR, bundle, "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

        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

        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

    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.