Package org.apache.geronimo.deployment.tools.loader

Examples of org.apache.geronimo.deployment.tools.loader.ConnectorDeployable


    public void testCreateDatabase() throws Exception {
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("database.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(resource);
        assertEquals(ModuleType.RAR, deployable.getType());
        Set entrySet = new HashSet(Collections.list(deployable.entries()));
        Set resultSet = new HashSet();
        resultSet.add("META-INF/");
        resultSet.add("META-INF/MANIFEST.MF");
        resultSet.add("META-INF/LICENSE.txt");
        resultSet.add("META-INF/ra.xml");
        resultSet.add("tranql-connector-1.0.jar");
        assertEquals(resultSet, entrySet);
        DDBeanRoot root = deployable.getDDBeanRoot();
        assertNotNull(root);
        assertEquals(ModuleType.RAR, root.getType());
        assertEquals(deployable, root.getDeployableObject());
        // Create the DConfigBeanRoot
        Connector15DCBRoot dcbRoot = new Connector15DCBRoot(root);
View Full Code Here


        InputStream in = classLoader.getResource("plan-with-nulls.xml").openStream();

        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("database.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(resource);
        assertEquals(ModuleType.RAR, deployable.getType());
        DDBeanRoot root = deployable.getDDBeanRoot();
        assertNotNull(root);
        assertEquals(ModuleType.RAR, root.getType());
        assertEquals(deployable, root.getDeployableObject());
        // Create the DConfigBeanRoot
        Connector15DCBRoot dcbRoot = new Connector15DCBRoot(root);
View Full Code Here

    public void testCreateJMSResource() throws Exception {
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("jms.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(resource);
        assertEquals(ModuleType.RAR, deployable.getType());
        Set entrySet = new HashSet(Collections.list(deployable.entries()));
        assertTrue(entrySet.contains("META-INF/ra.xml"));
        assertTrue(entrySet.contains("activemq-ra-3.2.1.jar"));
        DDBeanRoot root = deployable.getDDBeanRoot();
        assertNotNull(root);
        assertEquals(ModuleType.RAR, root.getType());
        assertEquals(deployable, root.getDeployableObject());
        // Create the DConfigBeanRoot
        Connector15DCBRoot dcbRoot = new Connector15DCBRoot(root);
View Full Code Here

    public void testLoadJMSResources() throws Exception {
        InputStream in = classLoader.getResource("jms-plan.xml").openStream();
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("jms.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(resource);
        assertEquals(ModuleType.RAR, deployable.getType());
        Set entrySet = new HashSet(Collections.list(deployable.entries()));
        assertTrue(entrySet.contains("META-INF/ra.xml"));
        assertTrue(entrySet.contains("activemq-ra-3.2.1.jar"));
        DDBeanRoot root = deployable.getDDBeanRoot();
        assertNotNull(root);
        assertEquals(ModuleType.RAR, root.getType());
        assertEquals(deployable, root.getDeployableObject());
        // Create the DConfigBeanRoot
        Connector15DCBRoot dcbRoot = new Connector15DCBRoot(root);
View Full Code Here

        if(data.objectName == null || data.objectName.equals("")) { // we're creating a new pool
            //data.instanceName = data.instanceName.replaceAll("\\s", "");
            DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
            try {
                File rarFile = PortletManager.getRepositoryEntry(request, data.getRarURI());
                ConnectorDeployable deployable = new ConnectorDeployable(rarFile.toURL());
                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);

                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
View Full Code Here

    private ResourceAdapterParams loadConfigPropertiesByPath(PortletRequest request, String rarPath) {
        DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
        try {
            URL url = getRAR(request, rarPath).toURL();
            ConnectorDeployable deployable = new ConnectorDeployable(url);
            final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
            String adapterName = null, adapterDesc = null;
            String[] test = ddBeanRoot.getText("connector/display-name");
            if (test != null && test.length > 0) {
                adapterName = test[0];
            }
View Full Code Here

        if (data.abstractName == null || data.abstractName.equals("")) { // we're creating a new pool
            data.name = data.name.replaceAll("\\s", "");
            DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
            try {
                File rarFile = getRAR(request, data.getRarPath());
                ConnectorDeployable deployable = new ConnectorDeployable(rarFile.toURL());
                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(
                        ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);

                EnvironmentData environment = new EnvironmentData();
View Full Code Here

    private ResourceAdapterParams loadConfigPropertiesByPath(PortletRequest request, String rarPath) {
        DeploymentManager mgr = PortletManager.getDeploymentManager(request);
        try {
            URL url = getRAR(request, rarPath).toURL();
            ConnectorDeployable deployable = new ConnectorDeployable(url);
            final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
            String adapterName = null, adapterDesc = null;
            String[] test = ddBeanRoot.getText("connector/display-name");
            if(test != null && test.length > 0) {
                adapterName = test[0];
            }
View Full Code Here

        if(data.abstractName == null || data.abstractName.equals("")) { // we're creating a new pool
            data.name = data.name.replaceAll("\\s", "");
            DeploymentManager mgr = PortletManager.getDeploymentManager(request);
            try {
                File rarFile = getRAR(request, data.getRarPath());
                ConnectorDeployable deployable = new ConnectorDeployable(rarFile.toURL());
                DeploymentConfiguration config = mgr.createConfiguration(deployable);
                final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
               
                EnvironmentData environment = new EnvironmentData();
                connector.setEnvironment(environment);
View Full Code Here

    private ResourceAdapterParams loadConfigPropertiesByPath(PortletRequest request, String rarPath) {
        DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
        try {
            URL url = getRAR(request, rarPath).toURL();
            ConnectorDeployable deployable = new ConnectorDeployable(url);
            final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
            String adapterName = null, adapterDesc = null;
            String[] test = ddBeanRoot.getText("connector/display-name");
            if (test != null && test.length > 0) {
                adapterName = test[0];
            }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.tools.loader.ConnectorDeployable

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.