Package org.apache.openejb.component

Examples of org.apache.openejb.component.ClassLoaderEnricher


                    SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
                }
            }
        }
        if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
            SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());
        }

        // annotation deployer encapsulate some logic, to be able to push to it some config
        // we give the ability here to get the internal deployer to push the config values
        final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
View Full Code Here


                    SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
                }
            }
        }
        if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
            SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());
        }

        // annotation deployer encapsulate some logic, to be able to push to it some config
        // we give the ability here to get the internal deployer to push the config values
        final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
View Full Code Here

                }
            }
        }

        // from config
        final ClassLoaderEnricher classLoaderEnricher = SystemInstance.get().getComponent(ClassLoaderEnricher.class);
        if (null != classLoaderEnricher) {
            final URL[] enrichment = classLoaderEnricher.applicationEnrichment();
            if (null != enrichment && enrichment.length > 0) {
                urls.addAll(Arrays.asList(enrichment));
            }
        }
View Full Code Here

        final TomEEClassLoaderEnricher classLoaderEnricher = new TomEEClassLoaderEnricher();
        SystemInstance.get().setComponent(WebAppEnricher.class, classLoaderEnricher);

        // add common lib even in ear "lib" part (if the ear provides myfaces for instance)

        final ClassLoaderEnricher enricher = SystemInstance.get().getComponent(ClassLoaderEnricher.class);
        if (null != enricher) {
            for (final URL url : classLoaderEnricher.enrichment(null)) { // we rely on the fact we know what the impl does with null but that's fine
                enricher.addUrl(url);
            }
        }

        // optional services
        if (optionalService(properties, "org.apache.tomee.webservices.TomeeJaxRsService")) {
View Full Code Here

                    SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
                }
            }
        }
        if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
            SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());
        }

        // annotation deployer encapsulate some logic, to be able to push to it some config
        // we give the ability here to get the internal deployer to push the config values
        final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
View Full Code Here

                    SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
                }
            }
        }
        if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
            SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());
        }

        // annotation deployer encapsulate some logic, to be able to push to it some config
        // we give the ability here to get the internal deployer to push the config values
        final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
View Full Code Here

                    SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
                }
            }
        }
        if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
            SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());
        }

        // annotation deployer encapsulate some logic, to be able to push to it some config
        // we give the ability here to get the internal deployer to push the config values
        final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
View Full Code Here

                    SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
                }
            }
        }
        if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
            SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());
        }

        // annotation deployer encapsulate some logic, to be able to push to it some config
        // we give the ability here to get the internal deployer to push the config values
        final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
View Full Code Here

            return;
        }

        final File file = new File(configFile);
        if (file.exists()) {
            final ClassLoaderEnricher enricher = SystemInstance.get().getComponent(ClassLoaderEnricher.class);

            BufferedReader reader = null;
            try {
                reader = new BufferedReader(new FileReader(file));
                String line;
                while ((line = reader.readLine()) != null) {
                    line = line.trim();
                    if (line.isEmpty() || line.startsWith("#")) {
                        continue;
                    }

                    final File lib = new File(ProvisioningUtil.realLocation(line));
                    if (lib.exists()) {
                        enricher.addUrl(lib.toURI().toURL());
                    } else {
                        throw new OpenEJBRuntimeException("can't find " + line);
                    }
                }
            } catch (Exception e) {
View Full Code Here

            }
        }
        if (dir.exists()) {
            final File[] libs = dir.listFiles();
            if (libs != null) {
                final ClassLoaderEnricher enricher = SystemInstance.get().getComponent(ClassLoaderEnricher.class);
                for (final File lib : libs) {
                    try {
                        enricher.addUrl(lib.toURI().toURL());
                    } catch (MalformedURLException e) {
                        throw new OpenEJBRuntimeException(e);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.openejb.component.ClassLoaderEnricher

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.