简体   繁体   English

Spring集成:Jdbc-Inbound-adapter数据库锁

[英]Spring Integration: Jdbc-Inbound-adapter DB Lock

How can I set a lock in a column (field) in DB using Spring Integration (XML) using jdbc-inbound-adapter? 如何使用jdbc-inbound-adapter使用Spring Integration(XML)在数据库的列(字段)中设置锁定?

The reason is to avoid concurrency problems while multiple processes are accessing the same db. 原因是为了避免在多个进程访问同一数据库时出现并发问题。

What you need is out of Spring Integration responsibly and it is called SELECT ... FOR UPDATE . 您需要负责任地脱离Spring Integration,这就是SELECT ... FOR UPDATE See answer here: When to use SELECT ... FOR UPDATE? 参见答案: 何时使用SELECT ... FOR UPDATE?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM