After using the ResultSet and Statement objects, you must explicitly close them.
This requirement applies to all ResultSet and Statement objects created by the OceanBase Connector/J driver.
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: Close both the ResultSet object rs and the Statement object st.
rs.close();
st.close();