Package javax.jcr

Examples of javax.jcr.RepositoryFactory


     */
    protected Repository acquireJcrRepository( Map<String, String> jcrConfig ) {
        try {
            Iterator<RepositoryFactory> factories = ServiceRegistry.lookupProviders(RepositoryFactory.class);
            while (factories.hasNext()) {
                RepositoryFactory factory = factories.next();
                log.debug("Trying to acquire JCR repository from factory " + factory);
                Repository repository = factory.getRepository(jcrConfig);
                if (repository != null) {
                    log.debug("Successfully acquired JCR repository from factory " + factory);
                    return repository;
                }
                log.debug("Could not acquire JCR repository from factory " + factory);
View Full Code Here


        log.append(newline);
        log.append("The following RepositoryFactory classes were consulted:");
        Iterator<RepositoryFactory> iterator =
                ServiceRegistry.lookupProviders(RepositoryFactory.class);
        while (iterator.hasNext()) {
            RepositoryFactory factory = iterator.next();
            log.append(newline);
            log.append("    ");
            log.append(factory.getClass().getName());
            try {
                Repository repository = factory.getRepository(parameters);
                if (repository != null) {
                    // We found the requested repository! Return it
                    // and just ignore the error message being built.
                    return repository;
                } else {
View Full Code Here

//                        return repo;
//                    }
//                }

            Class<?> jcrFactory = ClassUtil.forName(jcrImplementationClass, this.getClass());
            RepositoryFactory factory = (RepositoryFactory) jcrFactory.newInstance();
            repository = factory.getRepository(properties);
            this.factory = factory;
            return repository;

        } catch (Exception re) {
            throw new RepositoryException(re);
View Full Code Here

TOP

Related Classes of javax.jcr.RepositoryFactory

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.