[jboss-jira] [JBoss JIRA] (WFLY-6662) Statement.cancel() is not invoked until the statement is completed
lorenzo benvenuti (JIRA)
issues at jboss.org
Tue May 31 08:51:00 EDT 2016
[ https://issues.jboss.org/browse/WFLY-6662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lorenzo benvenuti updated WFLY-6662:
------------------------------------
Description:
Hi,
in our application we are using the {{Statement.cancel()}} method to stop long-running queries; in Wildfly 9.0.2 this is not working because the {{cancel()}} method is synchronized using a lock which is not released until the query is executed. In {{WrappedStatement}}:
{code:java}
public void cancel() throws SQLException
{
if (doLocking)
lock();
try
{
/* ... */
{code}
It seems this behaviour has changed from version 1.2.5.Final of ironjacamar-jdbc; in version 1.2.4.Final {{WrappedStatement.cancel}} doesn't try to obtain the lock.
Probably I'm missing something, but to me it's strange that in order to cancel a statement you have to wait for its completion.
Thank you,
lorenzo
was:
Hi,
in our application we are using the {{Statement.cancel()}} method to stop long-running queries; in Wildfly 9.0.2 this is not working because the {{cancel()}} method is synchronized using a lock which is not released until the query is executed. In {{WrappedStatement}}:
{code:java}
public void More ...cancel() throws SQLException
{
if (doLocking)
lock();
try
{
/* ... */
{code}
It seems this behaviour has changed from version 1.2.5.Final of ironjacamar-jdbc; in version 1.2.4.Final {{WrappedStatement.cancel}} doesn't try to obtain the lock.
Probably I'm missing something, but to me it's strange that in order to cancel a statement you have to wait for its completion.
Thank you,
lorenzo
> Statement.cancel() is not invoked until the statement is completed
> ------------------------------------------------------------------
>
> Key: WFLY-6662
> URL: https://issues.jboss.org/browse/WFLY-6662
> Project: WildFly
> Issue Type: Bug
> Components: JCA
> Affects Versions: 9.0.2.Final
> Reporter: lorenzo benvenuti
> Assignee: Jesper Pedersen
>
> Hi,
> in our application we are using the {{Statement.cancel()}} method to stop long-running queries; in Wildfly 9.0.2 this is not working because the {{cancel()}} method is synchronized using a lock which is not released until the query is executed. In {{WrappedStatement}}:
> {code:java}
> public void cancel() throws SQLException
> {
> if (doLocking)
> lock();
> try
> {
> /* ... */
> {code}
> It seems this behaviour has changed from version 1.2.5.Final of ironjacamar-jdbc; in version 1.2.4.Final {{WrappedStatement.cancel}} doesn't try to obtain the lock.
> Probably I'm missing something, but to me it's strange that in order to cancel a statement you have to wait for its completion.
> Thank you,
> lorenzo
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list