|
|
|
Extended session and automatic versioning
|
|||
|---|---|---|---|
|
#18+
Добрый день, сразу вопрос After reconnection, to force a version check on data you are not updating, you can call Session.lock() with LockMode.READ on any objects that might have been updated by another transaction. You do not need to lock any data that you are updating. Usually you would set FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to actually persist all modifications made in this conversation. Only this last database transaction will include the flush() operation, and then close() the session to end the conversation. насколько я понимаю тут имеется ввиду что сессия по всему приложению есть одна, при user think time jdbc конекшн обернутый в сессию просто возвращается в пул, синхронизация с базой происходит при каждой последующей транзакции, типа есть несколько транзакций только одна из них комитит, а остальные только read only, допустим у меня есть DAO метод типа: Код: java 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. в общем я не совсем понимаю как реализовать этот паттерн, кто может линканите на ресурс где можно подробно почитать ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 17.01.2015, 14:29 |
|
||
|
|

start [/forum/topic.php?fid=59&tid=2125934]: |
0ms |
get settings: |
7ms |
get forum list: |
20ms |
check forum access: |
6ms |
check topic access: |
6ms |
track hit: |
165ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
27ms |
get tp. blocked users: |
1ms |
| others: | 198ms |
| total: | 440ms |

| 0 / 0 |
