Saving Data back to DB Takes Forever
Hi,
I've created a multithreaded application which reads in data from a Database A (on Sybase Server), performs number crunching on the data, and saves the data to Database B (on SQL Server). I'm using JTDS for the sql server and JConnect (Sybase Drivers) for the Sybase server. The problem is it takes forever to save the data. I think it's getting blocked somewhere but can't seem to figure out where. Here's is a stack dump of the thread which is saving the data:
Thread [Thread-9] (Suspended)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]
SocketInputStream.read(byte[], int, int) line: not available
DataInputStream.readFully(byte[], int, int) line: not available
DataInputStream.readFully(byte[]) line: not available
SharedSocket.readPacket(byte[]) line: 841
SharedSocket.getNetPacket(int, byte[]) line: 722
ResponseStream.getPacket() line: 466
ResponseStream.read() line: 103
ResponseStream.peek() line: 88
TdsCore.wait(int) line: 3928
TdsCore.executeSQL(String, String, ParamInfo[], boolean, int, int, int, boolean) line: 1045
MSCursorResultSet.cursorCreate(String, String, ParamInfo[]) line: 536
MSCursorResultSet.<init>(JtdsStatement, String, String, ParamInfo[], int, int) line: 154
JtdsPreparedStatement(JtdsStatement).executeSQLQuery(String, String, ParamInfo[], boolean) line: 424
JtdsPreparedStatement.executeQuery() line: 777
CachedRowSetWriter.deleteOriginalRow(CachedRowSet, CachedRowSetImpl) line: not available
CachedRowSetWriter.writeData(RowSetInternal) line: not available
CachedRowSetImpl.acceptChanges() line: not available
CachedRowSetImpl.acceptChanges(Connection) line: not available
SaveData.saveToDB(PTConnection, CachedRowSet, String) line: 36
Data_3G(Module).run() line: 61
worker.run() line: 21
and here is a stack dump of a thread which is waiting on the save data (all other threads -- 10 threads in total -- are at this point:
Thread [Thread-1] (Suspended)
SaveData.saveToDB(PTConnection, CachedRowSet, String) line: 29
CDMAVoice(Module).run() line: 61
worker.run() line: 21
Thanks for the help!

