public void setReadOnly ( final boolean readOnly ) throws SQLException { try { logger . debug ( "conn={}({}) - set read-only to value {} {}" , protocol . getServerThreadId ( ) , protocol . isMasterConnection ( ) ? "M" : "S" , readOnly ) ; stateFlag |= ConnectionState . STATE_READ_ONLY ; protocol . setReadonly ( readOnly ) ; } catch ( SQLException e ) { throw ExceptionMapper . getException ( e , this , null , false ) ; } }
Sets whether this connection is read only .