@Override public void close() throws RepositoryException { super.close(); restartLock.readLock().unlock(); } };
@Override public void close() throws RepositoryException { super.close(); restartLock.readLock().unlock(); } };
/** * Return a Sesame RepositoryConnection to the underlying repository. The connection has auto-commit disabled, * all transaction management must be performed explicitly. * * @return a RepositoryConnection to the underlying Sesame repository. */ @Override @Produces public RepositoryConnection getConnection() throws RepositoryException { restartLock.readLock().lock(); RepositoryConnection connection = repository.getConnection(); return new RepositoryConnectionWrapper(repository,connection) { @Override public void close() throws RepositoryException { super.close(); restartLock.readLock().unlock(); } }; }
/** * Return a Sesame RepositoryConnection to the underlying repository. The connection has auto-commit disabled, * all transaction management must be performed explicitly. * * @return a RepositoryConnection to the underlying Sesame repository. */ @Override @Produces public RepositoryConnection getConnection() throws RepositoryException { restartLock.readLock().lock(); RepositoryConnection connection = repository.getConnection(); return new RepositoryConnectionWrapper(repository,connection) { @Override public void close() throws RepositoryException { super.close(); restartLock.readLock().unlock(); } }; }