Announcement Announcement Module
Collapse
No announcement yet.
Please tell me does SImpleJdbcInsert acquires a lock while inserting data in a table Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please tell me does SImpleJdbcInsert acquires a lock while inserting data in a table

    Please tell me does SImpleJdbcInsert acquires a row lock while inserting data in a table & return the right primarykey. Lately after doing some analysis I came to know that while 100 people are inserting data & returning the primarykey, some of the primary keys got mixed up. Which caused two people to get two different primary key, SO the question is simplejdbcinsert acquiring a row lock before insert.
    I would really appreciate some response on the same.
    Regards

  • #2
    If it does not which I am assuming please help with how to do that
    Regards

    Comment


    • #3
      Just letting on some additional information the database being used is mysql.
      Looking forward for a quick response

      Comment


      • #4
        On digging a but deeper I found that the mysql server acquires a read lock when the client issues a SELECT statement, and a write lock when the client issues an INSERT statement. So SimpleJdbcInsert might be very much acquiring a row lock while inserting data but while returning the primary key back that lock is not maintained.

        Comment

        Working...
        X