use of org.apache.jackrabbit.jcr2spi.AbstractRepositoryConfig in project jackrabbit by apache.
the class RepositoryStubImpl method getRepository.
/**
* @return the repository instance to test.
* @throws RepositoryStubException if an error occurs while starting up the
* repository.
*/
public Repository getRepository() throws RepositoryStubException {
if (repo == null) {
try {
final RepositoryService service = getRepositoryService();
repo = RepositoryImpl.create(new AbstractRepositoryConfig() {
public RepositoryService getRepositoryService() {
return service;
}
});
} catch (RepositoryException e) {
throw new RepositoryStubException(e);
}
}
return repo;
}
use of org.apache.jackrabbit.jcr2spi.AbstractRepositoryConfig 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;
}
Aggregations