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

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


    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


            //data.instanceName = data.instanceName.replaceAll("\\s", "");
            DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
            try {
                File rarFile = PortletManager.getRepositoryEntry(request, data.getRarURI());
                Bundle rarBundle = PortletManager.getRepositoryEntryBundle(request, data.getRarURI());
                ConnectorDeployable deployable = new ConnectorDeployable(rarBundle);
                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

    public void testCreateDatabase() throws Exception {
        Bundle bundle = new MockBundle(classLoader, "", 0L);
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("database.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        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

        Bundle bundle = new MockBundle(classLoader, "", 0L);
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("database.rar");
        assertNotNull(resource);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        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);
        Bundle bundle = new MockBundle(classLoader, "", 0L);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        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

        InputStream in = classLoader.getResource("jms-plan.xml").openStream();
        // Create and test the DDBeanRoot
        URL resource = classLoader.getResource("jms.rar");
        assertNotNull(resource);
        Bundle bundle = new MockBundle(classLoader, "", 0L);
        ConnectorDeployable deployable = new ConnectorDeployable(bundle);
        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

    private ResourceAdapterParams loadConfigPropertiesByPath(PortletRequest request, String rarPath) {
        DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
        try {
            //URI uri = getRAR(request, rarPath).toURI();
            ConnectorDeployable deployable = new ConnectorDeployable(PortletManager.getRepositoryEntryBundle(request, rarPath));
            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

            DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
            try {
                String rarPath = data.getRarPath();
                File rarFile = getRAR(request, rarPath);
                //URI uri = getRAR(request, data.getRarPath()).toURI();
                ConnectorDeployable deployable = new ConnectorDeployable(PortletManager.getRepositoryEntryBundle(request, rarPath));
                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 = ManagementHelper.getManagementHelper(request).getDeploymentManager();
        try {
            //URI uri = getRAR(request, rarPath).toURI();
            ConnectorDeployable deployable = new ConnectorDeployable(PortletManager.getRepositoryEntryBundle(request, rarPath));
            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

            DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
            try {
                String rarPath = data.getRarPath();
                File rarFile = getRAR(request, rarPath);
                //URI uri = getRAR(request, data.getRarPath()).toURI();
                ConnectorDeployable deployable = new ConnectorDeployable(PortletManager.getRepositoryEntryBundle(request, rarPath));
                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

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.