if (txId == null) {
Frame error = Frames.createErrorFrame("Missing transaction id", Headers.create(), "BEGIN frames " +
"must contain the 'transaction' header.");
connection.write(error).close();
return;
<BUG>}
Transaction transaction = Transaction.create(connection, txId);
if (!connection.handler().registerTransaction(transaction)) {</BUG>
Frame error = Frames.createErrorFrame("Already existing transaction",
Headers.create(Frame.TRANSACTION, txId),

if (txId == null) {
Frame error = Frames.createErrorFrame("Missing transaction id", Headers.create(), "BEGIN frames " +
"must contain the 'transaction' header.");
connection.write(error).close();
return;
}
if (!Transactions.INSTANCE.registerTransaction(connection, txId)) {
Frame error = Frames.createErrorFrame("Already existing transaction",
Headers.create(Frame.TRANSACTION, txId),
