The read-only state is set on the current FBTpb instance in the FBManagedConnection, and this is reset when Connection.setTransactionIsolation(int) is called (even with the current isolation level). The read-only state needs to be retained until reset with Connection.setReadOnly(boolean).