[英]Cancel a stored procedure call when using Spring
The java.sql.Statement
interface provides a cancel method which allows to abort a database call from another thread. java.sql.Statement
接口提供了一个cancel方法,允许从另一个线程中止数据库调用。
However, I can't find a similar option available if I'm using Spring's StoredProcedure class to call a stored procedure. 但是,如果我使用Spring的StoredProcedure类来调用存储过程,我找不到类似的选项。
Is there any way to achieve the cancel / abort functionality if I use Spring's StoredProcedure? 如果我使用Spring的StoredProcedure,有没有办法实现取消/中止功能?
I am not sure of the conventional approach because till now I never came across this scenario :( . 我不确定传统方法,因为到现在为止我从未遇到过这种情况:(。
As an option you can extend StoredProcedure class and can write your own implementation of cancel()
there . 作为一个选项,你可以扩展StoredProcedure的类,并可以自己编写实施
cancel()
在那里。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.