Admincli Recovery Tests for XA TX with JDBC and JMS

Updated on Nov. 17, 2010 by Sherry.Hill@oracle.com

I. Test Case
II. Test Steps
III. Bug

I. Test Case
appserver-sqe/pe/transaction/recovery/cliapp2

II. Test Steps
1) set up sqe-cluster of 2 instances on 1 machine
2) use conventional broker clusters (service HA)
--check 2 jms-service modes in separate runs, e.g.
2a) configs.config.sqe-cluster-config.jms-service.type=LOCAL
2b) configs.config.sqe-cluster-config.jms-service.type=EMBEDDED
3) setup jdbc and jms resource and deploy app (servlet, session bean and mdb).
--check cluster of instance and broker
--check broker 2, which has no txn.
4) app does xa transaction from a session bean with CMT
i.e. 2 PC to 2 databases and 1 message queue from one glassfish instance, e.g. instance2
--set FailureInducer.setWaitPoint(PREPARED)
--insert 3 rows to DB_A in table student
--insert 3 rows to DB_B in table student
--send 3 messages to Queue1,
--During WaitPoint, kill instance2,
   (Checked that the broker 2 has 3 PREPARED message before instance2 is killed.
   and that broker 2 is still alive after instance 2 is killed.)
5) do admincli Delegated Recovery
(After recovery, mdb receives messages from the Queue1 and inserts it to DB_A)
6) Verify the results from database.
6a) recovery works fine for jms LOCAL mode
verifyxa, DB_A: 3;  DB_B: 3;  MQ: 3|#]
6b) recovery misses jms messages for jms EMBEDDED mode
verifyxa, DB_A: 3;  DB_B: 3;  MQ: 0|#]
7) retsart the instance2
8) check broker2 for txn
e.g. from test output on hudson jobs.
8a)  The broker2 doesn't have any message for jms LOCAL mode.
http://sqe-hudson.us.oracle.com:8080/hudson/job/sherry-cliapp2local/
list-txn-queue-common:
[exec] Listing all the transactions on the broker specified by:
[exec]
[exec] -------------------------
[exec] Host Primary Port
[exec] -------------------------
[exec] localhost 48686
[exec]
[exec] There are no transactions to list.
[exec]
8b)  The broker2 has 2 any message for jms EMBEDED mode.
http://sqe-hudson.us.oracle.com:8080/hudson/job/sherry-cliapp2embed/
list-txn-queue-common:
[exec] Listing all the transactions on the broker specified by:
[exec]
[exec] -------------------------
[exec] Host Primary Port
[exec] -------------------------
[exec] localhost 48686
[exec]
[exec] Transactions that are owned by this broker
[exec] --------------------------------------------------------------------------------
[exec] Transaction ID State User name # Msgs/# Acks Creation time
[exec] --------------------------------------------------------------------------------
[exec] 4916290712193784832 PREPARED guest 3/0 11/17/10 9:36:39 AM
[exec]

III. Bug
https://glassfish.dev.java.net/issues/show_bug.cgi?id=14750
recover-transactions missed jms data on a cluster of embedded jms-service