unit testing - JTA: how to be test JMS and JDBC failures? -


We are currently testing the behavior of JATA failure, which receives messages using JMS on the system, He keeps them, and sends the results using another class.

The whole thing is tied together using the spring. Current units use HSQLDB, Apache ActivMac and Bitronics for testing transactions management. Success with this has been limited, as most HSQLDB does not implement XA transactions.

So here's a question: How do I simulate best database failures in transaction unit testing? What is the standard JDBC driver (for Oracle, say) to fail in the middle of a test?

Nb is not a repeating test by pressing the power button :)

It is necessary to decide what you really want to do the test - for example if you want to test that Oracle will deal with beta and XA transactions with the Beatronics, then DAO is joking, Duffim suggested by your help In this case you are not able to connect the connectivity between transactions Need to find a way to break and then see how Batronix / Oracle recovery will handle - eg Exploration results and so on.

Note that in some cases there are actually ways to achieve the same functionality without using the XA transaction. It can be simple, fast and more qualified. For example, in very rare circumstances when messages using MOM and DML are executed in the database, there is a pattern similar to that which removes without XA, two resource managers are still updating.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -