public XATransactionId(final String key) { final String[] tmps = PatternUtils.split(pattern, key); if (tmps.length != 4) { throw new IllegalArgumentException("Illegal transaction key" + key); } assert tmps[0].equals("XID"); this.formatId = Integer.parseInt(tmps[1]); this.globalTransactionId = HexSupport.toBytesFromHex(tmps[2]); this.branchQualifier = HexSupport.toBytesFromHex(tmps[3]); }