Package org.apache.openejb.core

Examples of org.apache.openejb.core.EmptyResourcesClassLoader


            }
            if (url.getPath().endsWith("!/META-INF/beans.xml")) {
                return url;
            }
            try {
                final URLClassLoader loader = new URLClassLoader(new URL[]{url}, new EmptyResourcesClassLoader());
                final String[] paths = {
                    "META-INF/beans.xml",
                    "WEB-INF/beans.xml",
                    "/WEB-INF/beans.xml",
                    "/META-INF/beans.xml",
View Full Code Here


    }

    public static void addBeansXmls(final WebModule webModule) {
        final List<URL> urls = webModule.getScannableUrls();
        // parent returns nothing when calling getresources because we don't want here to be fooled by maven classloader
        final URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), new EmptyResourcesClassLoader());

        final List<URL> xmls = new LinkedList<>();
        try {
            final URL e = (URL) webModule.getAltDDs().get("beans.xml");
            if (e != null) { // first!
View Full Code Here

        public static boolean hasBeansXml(URL url) {
            if (url.getPath().endsWith("WEB-INF/classes/")) return true;
            if (url.getPath().endsWith("!/META-INF/beans.xml")) return true;
            try {
                final URLClassLoader loader = new URLClassLoader(new URL[]{ url } , new EmptyResourcesClassLoader());
                String[] paths = {
                        "META-INF/beans.xml",
                        "WEB-INF/beans.xml",
                        "/WEB-INF/beans.xml",
                        "/META-INF/beans.xml",
View Full Code Here

    }

    private void addBeansXmls(final WebModule webModule) {
        final List<URL> urls = webModule.getScannableUrls();
        // parent returns nothing when calling getresources because we don't want here to be fooled by maven classloader
        final URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), new EmptyResourcesClassLoader());

        final ArrayList<URL> xmls;
        try {
            xmls = Collections.list(loader.getResources("META-INF/beans.xml"));
            xmls.add((URL) webModule.getAltDDs().get("beans.xml"));
View Full Code Here

    public static Archive archive(final Module module, final URL location, boolean forceDescriptor) {
        final ClassLoader loader = module.getClassLoader();
        final String name = "META-INF/" + name();
        try {
            URL scanXml = new URLClassLoader(new URL[] { location }, new EmptyResourcesClassLoader()).getResource(name);
            if (scanXml == null && !forceDescriptor) {
                return ClasspathArchive.archive(loader, location);
            } else if (scanXml == null) {
                return new ClassesArchive();
            }
View Full Code Here

        public static boolean hasBeansXml(URL url) {
            if (url.getPath().endsWith("WEB-INF/classes/")) return true;
            if (url.getPath().endsWith("!/META-INF/beans.xml")) return true;
            try {
                final URLClassLoader loader = new URLClassLoader(new URL[]{ url } , new EmptyResourcesClassLoader());
                String[] paths = {
                        "META-INF/beans.xml",
                        "WEB-INF/beans.xml",
                        "/WEB-INF/beans.xml",
                        "/META-INF/beans.xml",
View Full Code Here

    }

    private void addBeansXmls(final WebModule webModule) {
        final List<URL> urls = webModule.getScannableUrls();
        // parent returns nothing when calling getresources because we don't want here to be fooled by maven classloader
        final URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), new EmptyResourcesClassLoader());

        final ArrayList<URL> xmls;
        try {
            xmls = Collections.list(loader.getResources("META-INF/beans.xml"));
            xmls.add((URL) webModule.getAltDDs().get("beans.xml"));
View Full Code Here

    }

    private void addBeansXmls(final WebModule webModule) {
        final List<URL> urls = webModule.getScannableUrls();
        // parent returns nothing when calling getresources because we don't want here to be fooled by maven classloader
        final URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), new EmptyResourcesClassLoader());

        final List<URL> xmls = new LinkedList<>();
        try {
            final URL e = (URL) webModule.getAltDDs().get("beans.xml");
            if (e != null) { // first!
View Full Code Here

            }
            if (url.getPath().endsWith("!/META-INF/beans.xml")) {
                return url;
            }
            try {
                final URLClassLoader loader = new URLClassLoader(new URL[]{url}, new EmptyResourcesClassLoader());
                final String[] paths = {
                    "META-INF/beans.xml",
                    "WEB-INF/beans.xml",
                    "/WEB-INF/beans.xml",
                    "/META-INF/beans.xml",
View Full Code Here

        public static boolean hasBeansXml(URL url) {
            if (url.getPath().endsWith("WEB-INF/classes/")) return true;
            if (url.getPath().endsWith("!/META-INF/beans.xml")) return true;
            try {
                final URLClassLoader loader = new URLClassLoader(new URL[]{ url } , new EmptyResourcesClassLoader());
                String[] paths = {
                        "META-INF/beans.xml",
                        "WEB-INF/beans.xml",
                        "/WEB-INF/beans.xml",
                        "/META-INF/beans.xml",
View Full Code Here

TOP

Related Classes of org.apache.openejb.core.EmptyResourcesClassLoader

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.