public void checkTransactionMode(ServerStatement.TransactionMode transactionMode) {
switch (transactionMode) {
case NONE:
case NEW:
case NEW_WRITE:
throw new TransactionInProgressException();
case WRITE:
if (readOnly)
throw new TransactionReadOnlyException();
beforeUpdate();
break;