1

Here is a portion of our code

@Transactional
public void createAccount(){
    // db call on dao to insert data at TBL_ACCOUNT
    // web service call on insertUserInfo() method of UsersWebservice

}

In the code of UsersWebService:

public void insertUserInfo() {
      //check if user account record is already inserted in TBL_ACCOUNT
      // if yes - insert data in TBL_USER_INFO, else throw exception
}

Since the data insert in TBL_ACCOUNT is not yet committed, insertUserInfo method of UserswebService will always throw an exception, which shouldn't be since technically, there is already inserted data in TBL_ACCOUNT, its just not committed yet.

Is there a way to deal with this scenario?

by the way we are using Spring transaction version 4.2.4.RELEASE

0 Answers0