Package org.apache.openejb.loader

Examples of org.apache.openejb.loader.FileUtils


            addBeansXmls(appModule);

            // Persistence Units
            Properties p = new Properties();
            p.put(appModule.getModuleId(), appModule.getJarLocation());
            FileUtils base = new FileUtils(appModule.getModuleId(), appModule.getModuleId(), p);
            List<URL> filteredUrls = new ArrayList<URL>();
            DeploymentsResolver.loadFromClasspath(base, filteredUrls, appModule.getClassLoader());
            addPersistenceUnits(appModule, filteredUrls.toArray(new URL[filteredUrls.size()]));

            return appModule;
View Full Code Here


            configureEmbedded();
        }
    }

    private void preprocessProperties(Properties properties) {
        FileUtils base = SystemInstance.get().getBase();
        File confDir = new File(base.getDirectory(), "conf");
        File baseDir = base.getDirectory();
        File userDir = new File("foo").getParentFile();

        File[] paths = {confDir, baseDir, userDir};

        List<File> missing = new ArrayList<File>();
View Full Code Here

      
        return null;
    }

    private void overrideProperties(String serviceName, Properties serviceProperties) throws IOException {
        FileUtils base = SystemInstance.get().getBase();

        // Override with file from conf dir
        File conf = base.getDirectory("conf");
        if (conf.exists()) {
            File serviceConfig = new File(conf, serviceName + ".properties");
            if (serviceConfig.exists()) {
                FileInputStream in = new FileInputStream(serviceConfig);
                try {
View Full Code Here

            deployments.addAll(openejb.getDeployments());
        }

        // resolve jar locations //////////////////////////////////////  BEGIN  ///////

        FileUtils base = SystemInstance.get().getBase();

        List<URL> declaredAppsUrls = new ArrayList<URL>();
        try {
            for (Deployments deployment : deployments) {
                DeploymentsResolver.loadFrom(deployment, base, declaredAppsUrls);
View Full Code Here

        }
        return toString(declaredAppsUrls);
    }

    public ArrayList<File> getModulesFromClassPath(List<String> declaredApps, ClassLoader classLoader) {
        FileUtils base = SystemInstance.get().getBase();
        if (declaredApps == null) {
            declaredApps = getDeclaredApps();
        }
        List<URL> classpathAppsUrls = new ArrayList<URL>();
        DeploymentsResolver.loadFromClasspath(base, classpathAppsUrls, classLoader);
View Full Code Here

        return service;
    }

    private void overrideProperties(final String serviceName, final Properties serviceProperties) throws IOException {
        final SystemInstance systemInstance = SystemInstance.get();
        final FileUtils base = systemInstance.getBase();

        // Override with file from conf dir
        final File conf = base.getDirectory("conf");
        if (conf.exists()) {

            final String legacy = System.getProperty("openejb.conf.schema.legacy");
            boolean legacySchema = Boolean.parseBoolean((null != legacy ? legacy : "false"));
View Full Code Here

    private List<File> list() {
        final List<File> files = new ArrayList<File>();

        { // list all the files associated with hot deploy locations

            final FileUtils base = SystemInstance.get().getBase();
            for (final Deployments deployment : deployments) {
                DeploymentsResolver.loadFrom(deployment, base, files);
            }
        }
        return files;
View Full Code Here

    private static void configureInternal() throws IOException {

        System.setProperty("openjpa.Log", "log4j");
        SystemInstance system = SystemInstance.get();
        FileUtils base = system.getBase();
        File confDir = base.getDirectory("conf");
        File loggingPropertiesFile = new File(confDir, LOGGING_PROPERTIES_FILE);
        if (confDir.exists()) {
            if (loggingPropertiesFile.exists()) {
                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(loggingPropertiesFile));
                Properties props = new Properties();
View Full Code Here

            configureEmbedded();
        }
    }

    private static void preprocessProperties(Properties properties) {
        FileUtils base = SystemInstance.get().getBase();
        File confDir = new File(base.getDirectory(), "conf");
        File baseDir = base.getDirectory();
        File userDir = new File("foo").getParentFile();

        File[] paths = {confDir, baseDir, userDir};

        List missing = new ArrayList();
View Full Code Here

        daemons = (ServerService[]) enabledServers.toArray(new ServerService[]{});
    }

    private void overrideProperties(String serviceName, Properties serviceProperties) throws IOException {
        FileUtils base = SystemInstance.get().getBase();

        // Override with file from conf dir
        File conf = base.getDirectory("conf");
        if (conf.exists()) {
            File serviceConfig = new File(conf, serviceName + ".properties");
            if (serviceConfig.exists()) {
                FileInputStream in = new FileInputStream(serviceConfig);
                try {
View Full Code Here

TOP

Related Classes of org.apache.openejb.loader.FileUtils

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.