if( associatedXid!=null )
throw new TransactionInProgressException("Cannot commit() if an XA transaction is allready in progress ");
// Only send commit if the transaction was started.
if (localTransactionId!=null) {
TransactionInfo info = new TransactionInfo();
info.setTransactionId((String)localTransactionId);
info.setType(TransactionInfo.COMMIT);
//before we send, update the current transaction id
this.localTransactionId = null;
// Notify the listener that the tx was commited back
this.connection.syncSendPacket(info);
if (localTransactionEventListener != null) {