Hey,
I'm in the process of updating the SPI to the ideas presented in the
last series of posts. One thing that strikes me as odd is the existence
of the 2-phase commit StateCommitter thingy. I would prefer to remove it
as it gives us a false sense of security. Not many stores today
implement it, and I doubt many will. It is better to let the SPI be
one-phase only, and *iff* there are any stores that support 2-phase
commit, and the usecase warrants it, then they can easily integrate with
JTA like so:
1) JTA Tx start
2) Start UnitOfWork
3) Do changes on entities in multiple stores
4) UnitOfWork.complete()
4.1) EntityStore1 changes sent
4.2) EntityStore2 changes sent
5) JTA Tx commit
If the stores recognize JTA, then they can perform the changes in 4.1-2,
but also register with JTA for the final transaction completion marker
(or even maybe just use JDBC connections and let them do the JTA
integration). This way we don't have to deal with transactions at all in
our own SPI, but for stores who can deal with it it's still there as a
possibility.
What say ye?
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev