// First send a message to the queue
conn1 = cf.createConnection();
Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
JBossMessageProducer prod = (JBossMessageProducer)sess1.createProducer(queue1);
// non-persistent will cause message lost in server failure
prod.setDeliveryMode(DeliveryMode.PERSISTENT);
prod.enableOrderingGroup("testSimpleXATransactionalRecoveryCommitReceive");
TextMessage tm1 = sess1.createTextMessage("tm1");
TextMessage tm2 = sess1.createTextMessage("tm2");
TextMessage tm3 = sess1.createTextMessage("tm3");
TextMessage tm4 = sess1.createTextMessage("tm4");
prod.send(tm1);
prod.send(tm2);
prod.send(tm3);
prod.send(tm4);
xconn1 = cf.createXAConnection();
XASession xsess1 = xconn1.createXASession();