Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » JGit Repository usage in web application
JGit Repository usage in web application [message #645028] Wed, 15 December 2010 04:41
Laurent Petit is currently offline Laurent Petit
Messages: 21
Registered: December 2010
Junior Member
Hello,

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,

--
Laurent
Previous Topic:EGit trouble with keypass
Next Topic:Rename file/folder
Goto Forum:
  


Current Time: Tue Jul 22 21:58:48 EDT 2014

Powered by FUDForum. Page generated in 0.02949 seconds