ModeShape/modeshape — pull request #427 by rhauch (2012-06-26 18:27:48+00:00)
Title: MODE-1537 Corrected how manual transactions are implemented

ModeShape's initial support for JTA transactions included a bug that allowed this only to work for the first transaction. The state of that first transaction was kept, so ModeShape never registered a Synchronization implementation for subsequent transactions. Although the data was correctly persisted as part of these transactions, none of the events for the subsequent transactions were fired and thus the local caches became out of date and failed to expose the newly added/modified/deleted content.

ModeShape's internal transaction abstraction was corrected and simplified so that the transactional state is never managed by the system but instead is referenced by the client code using the transactions. This does make the API slightly more complex, but it greatly simplifies the implementation and corrects the transactional behavior.

A new integration test was added to use a SLSB with BMT to create a subgraph of nodes in one (or more) transactions, verify the structure (using a different transaction), and remove the subgraph in another transaction.

All unit and integration tests pass with these changes.