Hi everyone!
I'm new in Hibernate, and I have a question about Java Web and Hibernate usage.
I'm writing a web application which will be used by more than 20 people at a time. This means, that more than one user might be using the same feature of the application, and saving the same entity at the same time.
For example: _ A manager can be creating several users _ A team lead can be updating several users part of their team
So, my question is specifically about sessions. Should I use openSession() or getCurrentSession() method to handle DML operations into my MySQL database.
I'm worried about having problems with DML operations happening at the same time called by several users ( or even the same user in different AJAX calls ).
Could you please advice me on which would be the best option for me and why.
Thanks everyone in advance!
PS.: Sorry for my English, I'm a Spanish speaker :)
|