Examples of DDBean


Examples of javax.enterprise.deploy.model.DDBean

    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

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

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

    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.