0

I have a requirement in which I need to modify a field in 6 tables, and need to do that in single transaction.

So I used spring @Transactional (with default settings) for it.

Now, while fetching and updating data within transactional method, if any other call tries to access one of the table (Event), my application gets hanged due to possible lock on Event table, and in application logs, I get javax.persistence.PessimisticLockException.

What I want is that while executing @Transactional method, application should serve all read requests made to database, and should not get hanged due to lock.

Note: I am using derby database in Embedded mode. Things are working fine with MySql.

Please help.

Thanks.

user3106356
  • 31
  • 1
  • 3

0 Answers0