Package org.apache.xbean.finder

Examples of org.apache.xbean.finder.ResourceFinder.find()


                            ejbModules.put(module.getEjb(), url);
                        } else if (module.getJava() != null) {
                            URL url = finder.find(module.getJava().trim());
                            clientModules.put(module.getConnector(), url);
                        } else if (module.getConnector() != null) {
                            URL url = finder.find(module.getConnector().trim());
                            resouceModules.put(module.getConnector(), url);
                        } else if (module.getWeb() != null) {
                            URL url = finder.find(module.getWeb().getWebUri().trim());
                            webModules.put(module.getWeb().getWebUri(), url);
                            webContextRoots.put(module.getWeb().getWebUri(), module.getWeb().getContextRoot());
View Full Code Here


                            clientModules.put(module.getConnector(), url);
                        } else if (module.getConnector() != null) {
                            URL url = finder.find(module.getConnector().trim());
                            resouceModules.put(module.getConnector(), url);
                        } else if (module.getWeb() != null) {
                            URL url = finder.find(module.getWeb().getWebUri().trim());
                            webModules.put(module.getWeb().getWebUri(), url);
                            webContextRoots.put(module.getWeb().getWebUri(), module.getWeb().getContextRoot());
                        }
                    } catch (IOException e) {
                        throw new OpenEJBException("Invalid path to module " + e.getMessage(), e);
View Full Code Here

    protected static ClientModule createClientModule(URL clientUrl, String absolutePath, ClassLoader appClassLoader, String moduleName, boolean log) throws OpenEJBException {
        ResourceFinder clientFinder = new ResourceFinder(clientUrl);

        URL manifestUrl = null;
        try {
            manifestUrl = clientFinder.find("META-INF/MANIFEST.MF");
        } catch (IOException e) {
            //
        }

        String mainClass = null;
View Full Code Here

                if (applicationXmlUrl != null) {
                    application = unmarshal(Application.class, "application.xml", applicationXmlUrl);
                    for (Module module : application.getModule()) {
                        try {
                            if (module.getEjb() != null) {
                                URL url = finder.find(module.getEjb().trim());
                                ejbModules.put(module.getEjb(), url);
                            } else if (module.getJava() != null) {
                                URL url = finder.find(module.getJava().trim());
                                clientModules.put(module.getConnector(), url);
                            } else if (module.getConnector() != null) {
View Full Code Here

                        try {
                            if (module.getEjb() != null) {
                                URL url = finder.find(module.getEjb().trim());
                                ejbModules.put(module.getEjb(), url);
                            } else if (module.getJava() != null) {
                                URL url = finder.find(module.getJava().trim());
                                clientModules.put(module.getConnector(), url);
                            } else if (module.getConnector() != null) {
                                URL url = finder.find(module.getConnector().trim());
                                resouceModules.put(module.getConnector(), url);
                            } else if (module.getWeb() != null) {
View Full Code Here

                                ejbModules.put(module.getEjb(), url);
                            } else if (module.getJava() != null) {
                                URL url = finder.find(module.getJava().trim());
                                clientModules.put(module.getConnector(), url);
                            } else if (module.getConnector() != null) {
                                URL url = finder.find(module.getConnector().trim());
                                resouceModules.put(module.getConnector(), url);
                            } else if (module.getWeb() != null) {
                                URL url = finder.find(module.getWeb().getWebUri().trim());
                                webModules.put(module.getWeb().getWebUri(), url);
                                webContextRoots.put(module.getWeb().getWebUri(), module.getWeb().getContextRoot());
View Full Code Here

                                clientModules.put(module.getConnector(), url);
                            } else if (module.getConnector() != null) {
                                URL url = finder.find(module.getConnector().trim());
                                resouceModules.put(module.getConnector(), url);
                            } else if (module.getWeb() != null) {
                                URL url = finder.find(module.getWeb().getWebUri().trim());
                                webModules.put(module.getWeb().getWebUri(), url);
                                webContextRoots.put(module.getWeb().getWebUri(), module.getWeb().getContextRoot());
                            }
                        } catch (IOException e) {
                            throw new OpenEJBException("Invalid path to module " + e.getMessage(), e);
View Full Code Here

                    try {
                        URL clientUrl = clientModules.get(moduleName);
                        File clientFile = new File(clientUrl.getPath());
                        ResourceFinder clientFinder = new ResourceFinder(clientUrl);

                        URL manifestUrl = clientFinder.find("META-INF/MANIFEST.MF");
                        InputStream is = manifestUrl.openStream();
                        Manifest manifest = new Manifest(is);
                        String mainClass = manifest.getMainAttributes().getValue(Attributes.Name.MAIN_CLASS);

                        Map<String, URL> descriptors = getDescriptors(clientUrl);
View Full Code Here

    public static ServicesJar readServicesJar(String providerName) throws OpenEJBException {
        InputStream in = null;
        URL url = null;
        try {
            ResourceFinder finder = new ResourceFinder("META-INF/", Thread.currentThread().getContextClassLoader());
            url = finder.find(providerName + "/service-jar.xml");
            in = url.openStream();

            ServicesJar servicesJar = unmarshal(ServicesJar.class, in);
            return servicesJar;
        } catch (MalformedURLException e) {
View Full Code Here

        URL url = null;
        try {
            ResourceFinder finder = new ResourceFinder("META-INF/", Thread.currentThread().getContextClassLoader());
            String resourceName = providerName + "/service-jar.xml";
            try {
                url = finder.find(resourceName);
            } catch (IOException e) {
                //Make sure the default service-jar shipped with openejb-core could be read
                finder = new ResourceFinder("META-INF/", JaxbOpenejb.class.getClassLoader());
                url = finder.find(resourceName);
            }
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.