i'm using pessimistical locking therefore it's necessary to hold my connection for my whole update process.
Here my scenario:
* Screen with some datasets
* User is choosing one dataset and press update
* Lock dataset and hold connection
* Update screen where the user can fill some datas
* User can press save during his data entry
-> Here is my problem:
The save method should stay under transaction.
If there is already a open connection, DataSourceTransactionManager is creating a new connection. For pessimistical locking reasons it's necessary that the TransactionManager is using the same connection for the commit because otherwise he gets a lock exception of couse. It's only possible to update a locked dataset with the same connection.
* After the save method when the TransactionManager has executed the commit the lock is released.
* Re-Lock the dataset
I hope I was able to explain my problem.
Has anybody an idea how to manage this scenario?