title: How to correct close and delete database link in java program?
body: <p>My java program create database link in Oracle , then select data from it.
  In the end it tries close database link
   by ALTER SESSION CLOSE DATABASE LINK linkname and delete it.
  But I catched exception with - ORA-02080: database link is in use.
  If tried to drop link without closing, following exception will be catched - 
  ORA-02018: database link of same name has an open connection.
  How correct close and delete database link?
  Thanks in advance!</p>