git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Any plans to support JTA and XA in jgit?

From
Farrukh Najmi <farrukh@wellfleetsoftware.com>
Date
Nov 13, 2008, 20:27 UTC
Message-ID
<491C8DBE.9080105@wellfleetsoftware.com>
In-Reply-To
<200811132059.16616.robin.rosenberg.lists@dewire.com>
Robin Rosenberg wrote:
Show 13 quoted lines
> torsdag 13 november 2008 20:20:49 skrev Farrukh Najmi:
>   
>> Does the gjit team have any plans to implement support for JTA in gjit 
>> so as to allow distributed transactions using 2 phase commit? This would 
>> be very powerful when git is being used in conjunction with other 
>> transaction resource managers such as databases.
>>     
>
> No such plans exist. We do not even have a J2EE Resource Manager yet. I
> did some toying implementing one. As for XA support, I guess that would
> not be very hard per se, but my thoughts on JEE support was more in the direction
> of gitweb-like stuff, i.e. reading.
>   

I am not an expert on this but what I thought could be done is to enhance jgit so it can serve the role of a JTA compliant transactional resource manager similar to that in JDBC, JMS etc. As part of that it could serve resources as JTA XAResource. Not sure how hard all this could be though.

> Trying to involve git in distributed database transactions might be cool, but seriously: Do you
> need it? 

The problem I am trying to solve is this. In my service I need to store metadata in a relational db and content in git such that both either commit or not in a single transaction. If one commits and the other does not that is a serious integrity issue. Seems to me, two phase commit would be the right solution for that in the long run. This what JDBC + JMS topologies do.

A totally separate issue I have to sort out is how to handle multiple unrelated transactions that are modifying the same git repo. If a transaction needs to be rolled back how do roll back exactly some changes in some files in git that were impacted by the transaction. This is not easy because git (and most VCS) do not have transaction isolation like databases do. Any suggestions?

> As for JEE my ideas are: A nice JSP tag library and a resource manager. When is
> an entirely different question, as is who. Did you look at  my experiment in a reply of mine
> in another recent jgit thread?
>   

I am not very well versed in tag libraries myself. My situation is one where everything happens inside a SOAP service endpoint and so I suspect JSP tag libraries are not likely to be useful in that situation. Let me know if I am wrong in this assessment.

> The term "distributed" in XA is not quite the same as in distributed verison control. 
That is correct.
> If it would,
> then we'd send SQL commands over e-mail (now, /that/ would be cool :)
+1
Thanks very much for your help and that of other colleagues on the list.
-- 
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com
Previous: Robin RosenbergNext: Robin Rosenberg
Message 2 of 8 in “Re: Any plans to support JTA and XA in jgit?”
  1. Robin RosenbergNov 13, 2008
  2. Farrukh NajmiNov 13, 2008
  3. Robin RosenbergNov 13, 2008
  4. Kyle MoffettNov 14, 2008
  5. Farrukh NajmiNov 14, 2008
  6. Any overview available on jgit codebase?Farrukh Najmi, Nov 15, 2008
  7. Shawn O. PearceNov 15, 2008
  8. Farrukh NajmiNov 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.