/**
  * Release queue. {@inheritDoc}
  *
  * @see
  *     com.continuent.tungsten.replicator.plugin.ReplicatorPlugin#release(com.continuent.tungsten.replicator.plugin.PluginContext)
  */
 public void release(PluginContext context) throws ReplicatorException {
   queue = null;
   if (conn != null) {
     conn.close();
     conn = null;
   }
 }
 /** Wrapper for startHeartbeat() call. */
 public void startHeartbeat(
     String url, String user, String password, String name, String initScript)
     throws SQLException {
   Database db = null;
   try {
     db = DatabaseFactory.createDatabase(url, user, password);
     if (initScript != null) db.setInitScript(initScript);
     db.connect();
     startHeartbeat(db, name);
   } finally {
     db.close();
   }
 }
  /**
   * {@inheritDoc}
   *
   * @see
   *     com.continuent.tungsten.replicator.plugin.ReplicatorPlugin#release(com.continuent.tungsten.replicator.plugin.PluginContext)
   */
  @Override
  public void release(PluginContext context) throws ReplicatorException, InterruptedException {
    // Step 10 End the subscription.
    if (connection != null) {
      executeQuery(
          "BEGIN DBMS_CDC_SUBSCRIBE.DROP_SUBSCRIPTION("
              + "subscription_name => 'TUNGSTEN_PUB');END;",
          false);
    }

    if (connection != null) {
      connection.close();
      connection = null;
    }
  }