Examples of GerResourceType


Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

        //start installing the resource adapters in the client.
        Collection resourceModules = new ArrayList();
        GerResourceType[] resources = gerAppClient.getResourceArray();
        for (int i = 0; i < resources.length; i++) {
            GerResourceType resource = resources[i];
            String path;
            JarFile connectorFile;
            if (resource.isSetExternalRar()) {
                path = resource.getExternalRar().trim();
                Artifact artifact = Artifact.create(path);
                File file = null;
                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                    Repository repository = (Repository) iterator.next();
                    if (repository.contains(artifact)) {
                        file = repository.getLocation(artifact);
                        break;
                    }
                }
                if (file == null) {
                    throw new DeploymentException("Missing rar in repositories: " + path);
                }
                try {
                    connectorFile = new JarFile(file);
                } catch (IOException e) {
                    throw new DeploymentException("Could not access rar contents", e);
                }
            } else {
                path = resource.getInternalRar();
                try {
                    connectorFile = new NestedJarFile(moduleFile, path);
                } catch (IOException e) {
                    throw new DeploymentException("Could not locate connector inside ear", e);
                }
            }
            XmlObject connectorPlan = resource.getConnector();
            Module connectorModule = getConnectorModuleBuilder().createModule(connectorPlan, connectorFile, path, null, clientEnvironment, null, clientBaseName, naming, idBuilder);
            resourceModules.add(connectorModule);
        }

        return new AppClientModule(standAlone, moduleName, clientBaseName, serverEnvironment, clientEnvironment, moduleFile, targetPath, appClient, gerAppClient, specDD, resourceModules);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

                    //deploy the resource adapters specified in the geronimo-application.xml
                    Collection resourceModules = new ArrayList();
                    try {
                        GerResourceType[] resources = geronimoAppClient.getResourceArray();
                        for (int i = 0; i < resources.length; i++) {
                            GerResourceType resource = resources[i];
                            String path;
                            JarFile connectorFile;
                            if (resource.isSetExternalRar()) {
                                path = resource.getExternalRar().trim();
                                Artifact artifact = Artifact.create(path);
                                File file = null;
                                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                                    Repository repository = (Repository) iterator.next();
                                    if (repository.contains(artifact)) {
                                        file = repository.getLocation(artifact);
                                        break;
                                    }
                                }
                                if (file == null) {
                                    throw new DeploymentException("Missing rar in repositories: " + path);
                                }
                                try {
                                    connectorFile = new JarFile(file);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not access rar contents", e);
                                }
                            } else {
                                path = resource.getInternalRar();
                                try {
                                    connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not locate connector inside ear", e);
                                }
                            }
                            XmlObject connectorPlan = resource.getConnector();
                            Module connectorModule = getConnectorModuleBuilder().createModule(connectorPlan, connectorFile, path, null, appClientModule.getClientEnvironment(), null, appClientDeploymentContext.getModuleName(), earContext.getNaming(), idBuilder);
                            resourceModules.add(connectorModule);
                            //TODO configStore == null is fishy, consider moving these stages for connectors into the corresponding stages for this module.
                            getConnectorModuleBuilder().installModule(connectorFile, appClientDeploymentContext, connectorModule, null, null, repositories);
                        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

                    //deploy the resource adapters specified in the geronimo-application.xml
                    Collection resourceModules = new ArrayList();
                    try {
                        GerResourceType[] resources = geronimoAppClient.getResourceArray();
                        for (int i = 0; i < resources.length; i++) {
                            GerResourceType resource = resources[i];
                            String path;
                            JarFile connectorFile;
                            if (resource.isSetExternalRar()) {
                                path = resource.getExternalRar().trim();
                                URI pathURI = null;
                                try {
                                    pathURI = new URI(path);
                                } catch (URISyntaxException e) {
                                    throw new DeploymentException("Bad path to external rar", e);
                                }
                                if (!repository.hasURI(pathURI)) {
                                    throw new DeploymentException("Missing rar in repository: " + path);
                                }
                                URL pathURL = null;
                                try {
                                    pathURL = repository.getURL(pathURI);
                                } catch (MalformedURLException e) {
                                    throw new DeploymentException("Could not locate external rar in repository", e);
                                }
                                try {
                                    connectorFile = new JarFile(pathURL.getFile());
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not access rar contents", e);
                                }
                            } else {
                                path = resource.getInternalRar();
                                try {
                                    connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not locate connector inside ear", e);
                                }
                            }
                            XmlObject connectorPlan = resource.getConnector();
                            Module connectorModule = connectorModuleBuilder.createModule(connectorPlan, connectorFile, path, null, null, null);
                            resourceModules.add(connectorModule);
                            connectorModuleBuilder.installModule(connectorFile, appClientDeploymentContext, connectorModule);
                        }
                        //the install step could have added more dependencies... we need a new cl.
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

        //start installing the resource adapters in the client.
        Collection resourceModules = new ArrayList();
        GerResourceType[] resources = gerAppClient.getResourceArray();
        for (int i = 0; i < resources.length; i++) {
            GerResourceType resource = resources[i];
            String path;
            JarFile connectorFile;
            if (resource.isSetExternalRar()) {
                path = resource.getExternalRar().trim();
                Artifact artifact = Artifact.create(path);
                File file = null;
                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                    Repository repository = (Repository) iterator.next();
                    if (repository.contains(artifact)) {
                        file = repository.getLocation(artifact);
                        break;
                    }
                }
                if (file == null) {
                    throw new DeploymentException("Missing rar in repositories: " + path);
                }
                try {
                    connectorFile = new JarFile(file);
                } catch (IOException e) {
                    throw new DeploymentException("Could not access rar contents", e);
                }
            } else {
                path = resource.getInternalRar();
                try {
                    connectorFile = new NestedJarFile(moduleFile, path);
                } catch (IOException e) {
                    throw new DeploymentException("Could not locate connector inside ear", e);
                }
            }
            XmlObject connectorPlan = resource.getConnector();
            Module connectorModule = getConnectorModuleBuilder().createModule(connectorPlan, connectorFile, path, null, clientEnvironment, null, clientBaseName, naming, idBuilder);
            resourceModules.add(connectorModule);
        }

        return new AppClientModule(standAlone, moduleName, clientBaseName, serverEnvironment, clientEnvironment, moduleFile, targetPath, appClient, gerAppClient, specDD, resourceModules);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

                    //deploy the resource adapters specified in the geronimo-application.xml
                    Collection resourceModules = new ArrayList();
                    try {
                        GerResourceType[] resources = geronimoAppClient.getResourceArray();
                        for (int i = 0; i < resources.length; i++) {
                            GerResourceType resource = resources[i];
                            String path;
                            JarFile connectorFile;
                            if (resource.isSetExternalRar()) {
                                path = resource.getExternalRar().trim();
                                Artifact artifact = Artifact.create(path);
                                File file = null;
                                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                                    Repository repository = (Repository) iterator.next();
                                    if (repository.contains(artifact)) {
                                        file = repository.getLocation(artifact);
                                        break;
                                    }
                                }
                                if (file == null) {
                                    throw new DeploymentException("Missing rar in repositories: " + path);
                                }
                                try {
                                    connectorFile = new JarFile(file);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not access rar contents", e);
                                }
                            } else {
                                path = resource.getInternalRar();
                                try {
                                    connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not locate connector inside ear", e);
                                }
                            }
                            XmlObject connectorPlan = resource.getConnector();
                            Module connectorModule = getConnectorModuleBuilder().createModule(connectorPlan, connectorFile, path, null, appClientModule.getClientEnvironment(), null, appClientDeploymentContext.getModuleName(), earContext.getNaming(), idBuilder);
                            resourceModules.add(connectorModule);
                            //TODO configStore == null is fishy, consider moving these stages for connectors into the corresponding stages for this module.
                            getConnectorModuleBuilder().installModule(connectorFile, appClientDeploymentContext, connectorModule, null, null, repositories);
                        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

        //start installing the resource adapters in the client.
        Collection resourceModules = new ArrayList();
        GerResourceType[] resources = gerAppClient.getResourceArray();
        for (int i = 0; i < resources.length; i++) {
            GerResourceType resource = resources[i];
            String path;
            JarFile connectorFile;
            if (resource.isSetExternalRar()) {
                path = resource.getExternalRar().trim();
                Artifact artifact = Artifact.create(path);
                File file = null;
                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                    Repository repository = (Repository) iterator.next();
                    if (repository.contains(artifact)) {
                        file = repository.getLocation(artifact);
                        break;
                    }
                }
                if (file == null) {
                    throw new DeploymentException("Missing rar in repositories: " + path);
                }
                try {
                    connectorFile = new JarFile(file);
                } catch (IOException e) {
                    throw new DeploymentException("Could not access rar contents", e);
                }
            } else {
                path = resource.getInternalRar();
                try {
                    connectorFile = new NestedJarFile(moduleFile, path);
                } catch (IOException e) {
                    throw new DeploymentException("Could not locate connector inside ear", e);
                }
            }
            XmlObject connectorPlan = resource.getConnector();
            Module connectorModule = getConnectorModuleBuilder().createModule(connectorPlan, connectorFile, path, null, clientEnvironment, null, clientBaseName, naming, idBuilder);
            resourceModules.add(connectorModule);
        }

        return new AppClientModule(standAlone, moduleName, clientBaseName, serverEnvironment, clientEnvironment, moduleFile, targetPath, appClient, gerAppClient, specDD, resourceModules);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

                    //deploy the resource adapters specified in the geronimo-application.xml
                    Collection resourceModules = new ArrayList();
                    try {
                        GerResourceType[] resources = geronimoAppClient.getResourceArray();
                        for (int i = 0; i < resources.length; i++) {
                            GerResourceType resource = resources[i];
                            String path;
                            JarFile connectorFile;
                            if (resource.isSetExternalRar()) {
                                path = resource.getExternalRar();
                                URI pathURI = new URI(path);
                                if (!repository.hasURI(pathURI)) {
                                    throw new DeploymentException("Missing rar in repository: " + path);
                                }
                                URL pathURL = repository.getURL(pathURI);
                                connectorFile = new JarFile(pathURL.getFile());
                            } else {
                                path = resource.getInternalRar();
                                connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
                            }
                            XmlObject connectorPlan = resource.getConnector();
                            Module connectorModule = connectorModuleBuilder.createModule(connectorPlan, connectorFile, path, null, null);
                            resourceModules.add(connectorModule);
                            connectorModuleBuilder.installModule(connectorFile, appClientDeploymentContext, connectorModule);
                        }
                        ClassLoader cl = appClientDeploymentContext.getClassLoader(repository);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

        //start installing the resource adapters in the client.
        Collection resourceModules = new ArrayList();
        GerResourceType[] resources = gerAppClient.getResourceArray();
        for (int i = 0; i < resources.length; i++) {
            GerResourceType resource = resources[i];
            String path;
            JarFile connectorFile;
            if (resource.isSetExternalRar()) {
                path = resource.getExternalRar().trim();
                Artifact artifact = Artifact.create(path);
                File file = null;
                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                    Repository repository = (Repository) iterator.next();
                    if (repository.contains(artifact)) {
                        file = repository.getLocation(artifact);
                        break;
                    }
                }
                if (file == null) {
                    throw new DeploymentException("Missing rar in repositories: " + path);
                }
                try {
                    connectorFile = new JarFile(file);
                } catch (IOException e) {
                    throw new DeploymentException("Could not access rar contents", e);
                }
            } else {
                path = resource.getInternalRar();
                try {
                    connectorFile = new NestedJarFile(moduleFile, path);
                } catch (IOException e) {
                    throw new DeploymentException("Could not locate connector inside ear", e);
                }
            }
            XmlObject connectorPlan = resource.getConnector();
            Module connectorModule = getConnectorModuleBuilder().createModule(connectorPlan, connectorFile, path, null, clientEnvironment, null, clientBaseName, naming, idBuilder);
            resourceModules.add(connectorModule);
        }

        return new AppClientModule(standAlone, moduleName, clientBaseName, serverEnvironment, clientEnvironment, moduleFile, targetPath, appClient, gerAppClient, specDD, resourceModules);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

                    //deploy the resource adapters specified in the geronimo-application.xml
                    Collection resourceModules = new ArrayList();
                    try {
                        GerResourceType[] resources = geronimoAppClient.getResourceArray();
                        for (int i = 0; i < resources.length; i++) {
                            GerResourceType resource = resources[i];
                            String path;
                            JarFile connectorFile;
                            if (resource.isSetExternalRar()) {
                                path = resource.getExternalRar().trim();
                                URI pathURI = null;
                                try {
                                    pathURI = new URI(path);
                                } catch (URISyntaxException e) {
                                    throw new DeploymentException("Bad path to external rar", e);
                                }
                                if (!repository.hasURI(pathURI)) {
                                    throw new DeploymentException("Missing rar in repository: " + path);
                                }
                                URL pathURL = null;
                                try {
                                    pathURL = repository.getURL(pathURI);
                                } catch (MalformedURLException e) {
                                    throw new DeploymentException("Could not locate external rar in repository", e);
                                }
                                try {
                                    connectorFile = new JarFile(URLDecoder.decode(pathURL.getFile(), "UTF-8"));
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not access rar contents", e);
                                }
                            } else {
                                path = resource.getInternalRar();
                                try {
                                    connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not locate connector inside ear", e);
                                }
                            }
                            XmlObject connectorPlan = resource.getConnector();
                            Module connectorModule = connectorModuleBuilder.createModule(connectorPlan, connectorFile, path, null, null, null);
                            resourceModules.add(connectorModule);
                            connectorModuleBuilder.installModule(connectorFile, appClientDeploymentContext, connectorModule);
                        }
                        //the install step could have added more dependencies... we need a new cl.
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.client.GerResourceType

                    //deploy the resource adapters specified in the geronimo-application.xml
                    Collection resourceModules = new ArrayList();
                    try {
                        GerResourceType[] resources = geronimoAppClient.getResourceArray();
                        for (int i = 0; i < resources.length; i++) {
                            GerResourceType resource = resources[i];
                            String path;
                            JarFile connectorFile;
                            if (resource.isSetExternalRar()) {
                                path = resource.getExternalRar();
                                URI pathURI = null;
                                try {
                                    pathURI = new URI(path);
                                } catch (URISyntaxException e) {
                                    throw new DeploymentException("Bad path to external rar", e);
                                }
                                if (!repository.hasURI(pathURI)) {
                                    throw new DeploymentException("Missing rar in repository: " + path);
                                }
                                URL pathURL = null;
                                try {
                                    pathURL = repository.getURL(pathURI);
                                } catch (MalformedURLException e) {
                                    throw new DeploymentException("Could not locate external rar in repository", e);
                                }
                                try {
                                    connectorFile = new JarFile(pathURL.getFile());
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not access rar contents", e);
                                }
                            } else {
                                path = resource.getInternalRar();
                                try {
                                    connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
                                } catch (IOException e) {
                                    throw new DeploymentException("Could not locate connector inside ear", e);
                                }
                            }
                            XmlObject connectorPlan = resource.getConnector();
                            Module connectorModule = connectorModuleBuilder.createModule(connectorPlan, connectorFile, path, null, null, null);
                            resourceModules.add(connectorModule);
                            connectorModuleBuilder.installModule(connectorFile, appClientDeploymentContext, connectorModule);
                        }
                        //the install step could have added more dependencies... we need a new cl.
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.