Package org.apache.openejb.loader

Examples of org.apache.openejb.loader.FileUtils


    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

    public static File install(URL resource, String name, boolean overwrite) throws IOException {
        if (resource == null) return null;

        SystemInstance system = SystemInstance.get();
        FileUtils base = system.getBase();
        File conf = base.getDirectory("conf");

        if (!conf.exists()) return null;

        File file = new File(conf, name);
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

        // make a copy of the list because we update it
        deployments = new ArrayList<Deployments>(deployments);

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

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

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

            addBeansXmls(appModule);

            // Persistence Units
            final Properties p = new Properties();
            p.put(appModule.getModuleId(), appModule.getJarLocation());
            final FileUtils base = new FileUtils(appModule.getModuleId(), appModule.getModuleId(), p);
            final 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

    public static File install(URL resource, String name, boolean overwrite) throws IOException {
        if (resource == null) return null;

        SystemInstance system = SystemInstance.get();
        FileUtils base = system.getBase();
        File conf = base.getDirectory("conf");

        if (!conf.exists()) return null;

        File file = new File(conf, name);
View Full Code Here

        service = new ServiceDaemon(service);
        return service;
    }

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

        // Override with file from conf dir
        final File conf = base.getDirectory("conf");
        if (conf.exists()) {
            File serviceConfig = new File(conf, serviceName + ".properties");
            if (!serviceConfig.exists()) {
                serviceConfig = new File(conf, "conf.d/" + serviceConfig.getName()); // name was already built so use it
            }
View Full Code Here

            }
        }
    }

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

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

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

            }
        }

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

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

        final List<URL> declaredAppsUrls = new ArrayList<URL>();
        try {
            for (final Deployments deployment : deployments) {
                DeploymentsResolver.loadFrom(deployment, base, declaredAppsUrls);
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.