Search in sources :

Example 6 with RepositoryStubException

use of org.apache.jackrabbit.test.RepositoryStubException in project jackrabbit by apache.

the class RepositoryStubImpl method getRepository.

@Override
public synchronized Repository getRepository() throws RepositoryStubException {
    if (repository == null) {
        try {
            String url = environment.getProperty(PROP_REPOSITORY_URL);
            final RepositoryService service = createService(url);
            repository = RepositoryImpl.create(new AbstractRepositoryConfig() {

                public RepositoryService getRepositoryService() {
                    return service;
                }
            });
        } catch (Exception e) {
            throw new RepositoryStubException(e);
        }
    }
    return repository;
}
Also used : RepositoryStubException(org.apache.jackrabbit.test.RepositoryStubException) AbstractRepositoryConfig(org.apache.jackrabbit.jcr2spi.AbstractRepositoryConfig) RepositoryStubException(org.apache.jackrabbit.test.RepositoryStubException) RepositoryException(javax.jcr.RepositoryException) NotExecutableException(org.apache.jackrabbit.test.NotExecutableException) RepositoryService(org.apache.jackrabbit.spi.RepositoryService)

Aggregations

RepositoryException (javax.jcr.RepositoryException)6 RepositoryStubException (org.apache.jackrabbit.test.RepositoryStubException)6 Repository (javax.jcr.Repository)3 NotExecutableException (org.apache.jackrabbit.test.NotExecutableException)3 AbstractRepositoryConfig (org.apache.jackrabbit.jcr2spi.AbstractRepositoryConfig)2 RepositoryService (org.apache.jackrabbit.spi.RepositoryService)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 File (java.io.File)1 IOException (java.io.IOException)1 ObjectInputStream (java.io.ObjectInputStream)1 ObjectOutputStream (java.io.ObjectOutputStream)1 HashMap (java.util.HashMap)1 ClientAdapterFactory (org.apache.jackrabbit.rmi.client.ClientAdapterFactory)1 LocalAdapterFactory (org.apache.jackrabbit.rmi.client.LocalAdapterFactory)1 RemoteRepository (org.apache.jackrabbit.rmi.remote.RemoteRepository)1 RemoteAdapterFactory (org.apache.jackrabbit.rmi.server.RemoteAdapterFactory)1 ServerAdapterFactory (org.apache.jackrabbit.rmi.server.ServerAdapterFactory)1 JcrRemotingServlet (org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet)1 Server (org.mortbay.jetty.Server)1