}
}
// use a different branch
// XXX ideally should call JTS layer to get the branch id
XID xid;
if( Configuration.isLocalFactory()) {
xid = Utility.getXID(((ControlImpl) control).get_localCoordinator());
} else {
xid = Utility.getXID(control.get_coordinator());
}
factories.add(res);
byte [] branchid = parseSize(size);
byte [] sname = Configuration.getServerNameByteArray();
byte [] branch = new byte[sname.length+1+branchid.length];
System.arraycopy(sname, 0, branch, 0, sname.length);
branch[sname.length] = (byte) ',';
System.arraycopy(branchid, 0, branch, sname.length+1, branchid.length);
xid.setBranchQualifier(branch);
return xid;
}