|JGit Repository usage in web application [message #645028]
||Wed, 15 December 2010 04:41
| Laurent Petit
Registered: December 2010
A word on my context : I use JGit as a simple way to log all changes made by users of my web application to a "shared" file-based storage in the server.
Once I get a Repository instance, is it safe to keep it for the duration of an HttpSession ?
If an "admin" on the server commits to the Git repo, will the Repository instance, the next time it is invoked (eg through Porcelaine commands) "catch" the new state of the repository and apply the commit to the "right" head ?
Or should I create a Repository instance from scratch for each HttpRequest, and close() it in a "finally" block before the request ends ?
Thanks in advance,
Powered by FUDForum
. Page generated in 0.01455 seconds