Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[ASK] JDBC with SQL Server 2005 for concurrency problem

 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm facing a problem with JDBC Transaction.
I use SQL Server 2005 as Database of my company's machine since the machine shipped with it.

This is the scenario of my problem :
Let say, i want to insert some records into tableA which is the record data is come from file, but at the same time i want machine has no problem in accessing tableA with different records without have to wait until my transaction is finished.
But if there's error inserting process, then the transaction will be rollback. And the machine will stay running smoothly without any problem.

What's the best transaction isolation level for this?

Here's just snippet of pseudo code of what i've done in my code. (Sorry just to simplify)


In that code, machine will have to wait till the process is finished.

Is there a way to solve this issue?..

Please help me, how to solve my problem..

Any help will be highly appreciated.

Thanks,
With warmest regards,

Leonardo Carreira
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic