i have a textfile that contains 1300000 lines.i have written the java code for importing it into a mysql database.In the java class i have a method called textloadutility() which is called from a jsp page.Can someone give the asyncronous thread implementation of this java program.
package Snomed;
import catalog.Root;
import java.io.*;
import java.sql.PreparedStatement;
import org.json.JSONObject;
public class Textfileimport {
    public String textloadutility() throws Exception {
        Root oRoot = null;
        PreparedStatement oPrStmt = null;
        FileReader in = null;
        BufferedReader br=null;
        final int batchSize = 1000;
        int count = 0;
        JSONObject oJson = null;
        String str=null;
        oJson = new JSONObject();
         oJson.put("status","failure");
         str=oJson.toString();
        try {
             oRoot = Root.createDbConnection(null);
             String sql = "INSERT INTO textfiledata (col1,col2,col3,col4,col5,col6,col7,col8,col9) VALUES( ?, ?, ?,?,?,?,?,?,?)";
             oPrStmt = oRoot.con.prepareStatement(sql);
            in = new FileReader("C:/Users/i2cdev001/Desktop/snomedinfo_data.txt");      
            br = new BufferedReader(in);
            String strLine;
            while ((strLine = br.readLine()) != null){
                String [] splitSt =strLine.split("\\t");
                String dat1="",dat2="",dat3="",dat4="",dat5="",dat6="",dat7="",dat8="",dat9="";
                dat1=splitSt[0];
                dat2=splitSt[1];
                dat3=splitSt[2];
                dat4=splitSt[3];
                dat5=splitSt[4];
                dat6=splitSt[5];
                dat7=splitSt[6];
                dat8=splitSt[7];
                dat9=splitSt[8];        
                oPrStmt.setString(1, dat1);
                oPrStmt.setString(2, dat2);
                oPrStmt.setString(3, dat3);
                oPrStmt.setString(4, dat4);  
                oPrStmt.setString(5, dat5);
                oPrStmt.setString(6, dat6);
                oPrStmt.setString(7, dat7);
                oPrStmt.setString(8, dat8);
                oPrStmt.setString(9, dat9);
                oPrStmt.addBatch();
                if (++count % batchSize == 0) {
                    oPrStmt.executeBatch();
                    oPrStmt.clearBatch(); 
                   }                
            }
            oPrStmt.executeBatch();
             oJson.put("status","sucess");
             str=oJson.toString(); 
             in.close();
                br.close();
            System.out.println("sucessfully imported");
        }
        catch (Exception e) {
            oJson.put("status","failure");
             str=oJson.toString(); 
            e.printStackTrace();
            System.err.println("Error: " + e.getMessage());
        } finally {
            oPrStmt = Root.EcwClosePreparedStatement(oPrStmt);
            oRoot = Root.closeDbConnection(null, oRoot);
        }
        return str;
    }
}