You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Willis Morse <wi...@mac.com> on 2007/04/10 20:26:55 UTC
Programmatically fixing damaged repositories
I'm looking to embed Jackrabbit inside my standalone desktop app.
This means it has to be as self-reliant as possible. I'm wondering
what sort of automated procedures I can incorporate to recover from
situations where the repository has been corrupted.
So far, the only corruption I've been seen in my large repo tests are
corrupted index files. It was pretty obvious when this happened
because of the messages in the stack trace, and I just manually
deleted the index folder.
But how would I detect this situation programmatically? All I got
back in this case is a RepositoryException. I'm assuming that any
number of problems can cause a RepositoryException to be thrown.
I could just programatically delete the index folder whenever I get
this exception, but that seems extreme. And what other corruptions
should I be trying to detect and attempting to fix?
Finally, does anyone have any good recipes for causing corruption for
test purposes?
Thanks,
Willis Morse