1

Can anyone please help me on below queries.

1>How to achieve 100% consistency between cache and database.if I want both Gemfire and database participate in JTA transaction as regular transactional resources (supported two-phase commit).?

2> Is "last resource" optimization guarantee 100% consistency?

3> What are the JTA transaction managers supported and tested with "last resource" optimization?

4> What are the external transaction managers which are supported and tested with Gemfire?

Greg Chase
  • 173
  • 8
Shuvro Das
  • 71
  • 2

1 Answers1

1

For a non-last resource JTA transaction GemFire registers as a synchronization, so it has a say in the outcome of the transaction, but if the GemFire server was to die within the small window (between the beforeCommit() and afterCommit() call, GemFire would be inconsistent with other resources in the transaction). When GemFire is used as a last-resource, it gets the final say in the outcome of the transaction, so this window is effectively closed.

You will need to consult the documentation of your JTA transaction Manager to see if they could guarantee 100% consistency.

In GemFire the last resource optimization is tested with weblogic, and GemFire works with JTA transaction managers that register with the JNDI with the following names:

"java:/TransactionManager"
"java:comp/TransactionManager"
"java:appserver/TransactionManager"
"java:pm/TransactionManager"
"java:comp/UserTransaction"
Swapnil
  • 1,191
  • 7
  • 8