code: @EventHandler(field = "_resourceContext", eventSet = ResourceContext.ResourceEvents.class, eventName = "onRelease")
      public void onRelease() {
  
          if (LOGGER.isDebugEnabled()) {
              LOGGER.debug("Enter: onRelease()");
          }
  
          for (PreparedStatement ps : getResources()) {
              try {
                  ps.close();
              } catch (SQLException sqe) {
              }
          }
          getResources().clear();
  
          if (_connection != null) {
              try {
                  _connection.close();
              } catch (SQLException e) {
                  throw new ControlException("SQL Exception while attempting to close database connection.", e);
              }
          }
  
          _connection = null;
          _connectionDataSource = null;
          _connectionDriver = null;
      }
docs: Invoked by the controls runtime when an instance of this class is released by the runtime