Run ISVNRepositoryPool#dispose on the connection pool from which you create SVNRepository instance. It will stop the timer.
See also this article for SVNKit resources releasing.
Pergunta
I use svnkit
in java application to get svn revisions log, but after finish the process on the visualVm
some svnkit resource and thread still exist and live .
ex. org.tmatesoft.svn.core.internal.util.SVNHashMap$KeyIterator, org.tmatesoft.svn.core.wc.DefaultSVNRepositoryPool$TimeoutTask
And when i try to log more than once it effect the application performance.
how can i release svnkit resources?
Code sample:
public static SVNLogEntryHandler doLogFully(String[] paths, long startRevision, long endRevision, SVNRepository repository) throws SVNException {
SVNLogEntryHandler logEntryHandler = new SVNLogEntryHandler();
repository.log(paths, startRevision, endRevision, true, true, 0, false, null, logEntryHandler);
return logEntryHandler;
}
story log entry.
for (SVNLogEntry logEntry : doLogFully(..,..,..,..,..).getLogEntries()) {
// store log entry
}
Update
i create SVNRepository
using SVNRepositoryFactory
.
SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(repositoryUrl));
repository.setAuthenticationManager(SVNWCUtil.createDefaultAuthenticationManager(repositoryUserName, repositoryPassword));
Solução
Run ISVNRepositoryPool#dispose on the connection pool from which you create SVNRepository instance. It will stop the timer.
See also this article for SVNKit resources releasing.