i have made one swing application where i make a connection to Oracle database and then read
some 2000+ blob values and write it on different files on my hard-disk
now while the code is reading the blob data and then writing the blob data on the the file
, after some transaction i get this exception
the algorithm goes this way
(1)Take the db details and database table from where the blob has to be read from user(user enters the data in JTextFeild)
(2)Validate above information for blank or null values
(3)If validation is successful then move ahead.
(4)pass the validated information to a class ConnectionHelper , this class basically has api's to connect to database and then read
blob from db and write it in file.
(5) code to obtain connection is :
here oracle_connection is a static object of type Connection in ConnectionHelper class and dbDetails is a DTO which contains all database information.
(6)Code that reads Blob and writes in to file :
(7)Above method reads Blob data from db against an id which is passed as an argument,
then it will take the connection , now if connection is null or it is closed new connection will be passed
otherwise the existing connectin is returned (i believe i have messed up here!)
(8)and this method is called for more than 2000 times, and after a while when many files are written successfully i get the above