1

We are trying to implement two phase commit on a Java/Jboss/Apache environment.

However we have difficulty understanding how we can test that it actually works? are there any gui tools that can help us test it?

Thanks

leppie
  • 115,091
  • 17
  • 196
  • 297
andreas
  • 223
  • 1
  • 2
  • 6

2 Answers2

3

I can think of couple of scenarios

  • unplug once of the resources participating in a 2PC. my favorite
  • let one of the db operations fail with integrity constraint

The transaction should rollback.

Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
1

I'd consider adding some hooks to your application to force a failure at each stage one by one; so you can check the expected outcome.

Or use unit testing if thats easier.

Andrew
  • 1,606
  • 1
  • 12
  • 19