Discussions

EJB programming & troubleshooting: Jrun-MS-SQL-Duplication of records

  1. Jrun-MS-SQL-Duplication of records (2 messages)

    I am facing the unique problem on my production server(MS-SQl). Some times there are duplicated records are inserted into database, I am using the JRun application server and sqljdbc-1.1.jar. I checked the code , code is prefectly fine and i am not able to reproduce on the local box. I have set in the code autocommit false and set transaction to searlizeble and after the execution of query i am commiting. I tried double posting, refresh but this is not creating any duplicate record. I belive its problem with ms-sql queeing for executing query and rollback happens internaly if there is any exception/error in database side. Any one has faced this type of problem. Please let me know how to reslove the issue.
  2. When I encountered similar situation before, I enforced unique constraint on the primary key of the table to be inserted and thus jdbc driver will throw an exception ...trap the exception and stack trace to trace the duplicate records culprit.... the other option is keep the versioning on, jdbc loggin on the jdbc connection... Bhagvan K http://www.jroller.com/page/bhagvank
  3. When I encountered similar situation before, I enforced unique constraint on the primary key of the table to be inserted and thus jdbc driver will throw an exception ...trap the exception and stack trace to trace the duplicate records culprit.... the other option is keep the versioning on, jdbc loggin on the jdbc connection... Bhagvan K http://www.jroller.com/page/bhagvank