Hmm, I think you are right. File an issue in JIRA, I need to think about this a bit.
We have a project and we have customers and users..
one user opend a customer account (page) for change and write new staff about customer if one of the other users open the same customer and change, first users changing ll be lost..
so i need a system for not lose the changing.. like if one user select a customer, this customer object ll be lock.. i thing this transaction for what i need right??
i didnt understand how to use transactions in my project..
if you now something (links) can you write.. :)
This sounds more like locking than transactions. If you're using Hibernate or JPA then have a look at 'optimistic locking' using the @Version annotation.
You basically specify one field of Customer class as a version field
private @Version Long version;
Hibernate/JPA will then increment the version field every time it updates the row in the database. When it updates the field it checks that the version in the database is the same as the one it loaded - if it's different then it knows that the row has been updated by another user/process and throws an exception.
It's very efficient and doesn't require any actual locks in the database but prevents users from overwriting changes made by other users.