The ResultSet and Statement objects must be explicitly closed after the operation is complete.
This requirement applies to all ResultSet and Statement objects created by using OceanBase Connector/J.
OceanBase Connector/J has no post-processing mechanism. Therefore, routines of the ResultSet and Statement classes are cleared by using the close method. If a ResultSet or Statement object is not explicitly closed, serious memory leaks may occur and cursors in the database may be exhausted. After both the ResultSet and Statement objects are closed, the corresponding cursors in the database are released.
Example: Disable both the ResultSet object rs and the Statement object st.
rs.close();
st.close();