All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.drools.repository.RepositorySessionUtil Maven / Gradle / Ivy

There is a newer version: 5.1.1
Show newest version
package org.drools.repository;

import java.io.File;

import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import javax.jcr.LoginException;
import javax.jcr.RepositoryException;

/**
 * This is a utility to simulate session behavior for the test suite.
 * @author Michael Neale
 *
 */
public class RepositorySessionUtil {

    private static ThreadLocal repo = new ThreadLocal();
    private static Repository multiThreadedRepository;

//    private static final Logger log = Logger.getLogger( RepositorySessionUtil.class );

    public static boolean deleteDir(File dir) {

        if (dir.isDirectory()) {
            String[] children = dir.list();
            for (int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy