Package org.apache.jackrabbit.test

Examples of org.apache.jackrabbit.test.RepositoryStubException


            }

            return getOrCreateRepository(dir, xml);

        } catch (Exception e) {
            RepositoryStubException exception =
                    new RepositoryStubException("Failed to start repository");
            exception.initCause(e);
            throw exception;
        }
    }
View Full Code Here


            }

            return getOrCreateRepository(dir, xml);

        } catch (Exception e) {
            RepositoryStubException exception =
                    new RepositoryStubException("Failed to start repository");
            exception.initCause(e);
            throw exception;
        }
    }
View Full Code Here

    @Override
    public synchronized Repository getRepository() throws RepositoryStubException {
        Repository repository = JCRSessionFactory.getInstance();
        if (repository == null) {
            throw new RepositoryStubException("Failed to start repository");
        } else {
            try {
                Session session = JCRSessionFactory.getInstance().getCurrentUserSession();
                try {
                    if (!isTestWorkspacePrepared(session)) {
                        prepareTestContent(session);
                    }
                } finally {
                }
            } catch (Exception e) {
                RepositoryStubException exception = new RepositoryStubException(
                        "Failed to start repository");
                exception.initCause(e);
                throw exception;
            } finally {
                //JCRSessionFactory.getInstance().setCurrentUser(null);
            }
        }
View Full Code Here

            server.addHandler(context);

            try {
                server.start();
            } catch (Exception e) {
                throw new RepositoryStubException(e);
            }
        }

        if (client == null) {
            try {
                client = JcrUtils.getRepository(
                        "http://localhost:" + connector.getLocalPort() + "/");
            } catch (Exception e) {
                throw new RepositoryStubException(e);
            }
        }

        return client;
    }
View Full Code Here

                    prepareTestContent(session);
                } finally {
                    session.logout();
                }
            } catch (Exception e) {
                RepositoryStubException exception =
                    new RepositoryStubException("Failed to start repository");
                exception.initCause(e);
                throw exception;
            }
        }
        return repository;
    }
View Full Code Here

                InitialContext ctx = new InitialContext(env);
                RegistryHelper.registerRepository(ctx, repName, repConfig, repHome, true);

                repository = (Repository) ctx.lookup(repName);
            } catch (Exception e) {
                throw new RepositoryStubException(e.toString());
            }
        }
        return repository;
    }
View Full Code Here

            Repository r = cfd.getRepository(repositoryURI);
            //log.info("Acquired repository via RMI.");
            return r;
        } catch (Exception e) {
            //log.error("Error while retrieving repository using RMI: " + e);
            throw new RepositoryStubException(e.getMessage());
        }
    }
View Full Code Here

                xml = new File(dir, "repository.xml").getPath();
            }

            return getOrCreateRepository(dir, xml);
        } catch (Exception e) {
            throw new RepositoryStubException("Failed to start repository", e);
        }
    }
View Full Code Here

            server.addHandler(context);

            try {
                server.start();
            } catch (Exception e) {
                throw new RepositoryStubException(e);
            }
        }

        if (client == null) {
            try {
                client = JcrUtils.getRepository(
                        "http://localhost:" + connector.getLocalPort() + "/");
            } catch (Exception e) {
                throw new RepositoryStubException(e);
            }
        }

        return client;
    }
View Full Code Here

                    public RepositoryService getRepositoryService() {
                        return service;
                    }
                });
            } catch (RepositoryException e) {
                throw new RepositoryStubException(e);
            }
        }
        return repo;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.test.RepositoryStubException

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.