ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Borodin <sa...@whoissasha.com>
Subject Re: canceling statement?
Date Mon, 18 Apr 2005 15:07:21 GMT
Is there an sql command you can issue to cancel an already running sql
statement?  Is there an abstract way to identify a statement running in a db
system, which could be gotten through iBatis?

-Sasha


> From: Michael Zurke <mischa@zurke.info>
> Reply-To: <ibatis-user-java@incubator.apache.org>
> Date: Mon, 18 Apr 2005 15:57:39 +0100
> To: <ibatis-user-java@incubator.apache.org>
> Subject: Re: canceling statement?
> 
> yes - i think your're right when it comes to the multiple query/combine
> result issue - using DAO in this case would definitely make more sense.
> but in case DAO doesn't fit my model i still want to be able to built my
> own 'multilpe query executor' so i would be nice if i could cancel
> statments on the SQLMap layer. but maybe the problem is too specific to
> support it on a generic framework level. anyway ;)
> 
> Brice Ruth wrote:
>> I could see this being done in a DAO layer, perhaps ... I'm not sure
>> that the SqlMap layer is necessarily the right place for it. What do you
>> think?
>> 
>> On 4/18/05, *Michael Zurke* <mischa@zurke.info
>> <mailto:mischa@zurke.info>> wrote:
>> 
>>     i think it would make sense if ibatis would support something like
>>     multiple query processing (e.g. a query executed in parallel on
>>     different database clusters. then the abstraction layer should combine
>>     the results. in that case it would be handy to specify a timeout to get
>>     results back from the most responsive clusters only (-> cancel). but
>>     this is theoretical since ibatis doesn't support such functionality
>>     (right?). but still - if there would be something like SQLMap.cancel()
>>     one could implement the parallel querying quite easy, i guess.
>> 
>>     mish
>> 
>>     Brandon Goodin wrote:
>>> It is not a funciton that is available. But, i'm not sure why it
>>> wouldn't be available. iBatis uses straight JDBC underneath. It could
>>> provide some functionlaity to cancel. But, i'm not sure how we would
>>> provide the criteria for a cancel. Please expound on "why" you would
>>> cancel.
>>> 
>>> Brandon
>>> 
>>> On 4/18/05, Brice Ruth <bdruth@gmail.com
>>     <mailto:bdruth@gmail.com>> wrote:
>>> 
>>>> iBATIS is thread-local. The cancel() method requires that a
>>     separate thread
>>>> cancel a statement in an executing thread. I don't believe this
>>     would be
>>>> supported in this type of framework.
>>>> 
>>>> Reference:
>>>> http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#cancel()
>>>> 
>>>> BR
>>>> 
>>>> 
>>>> 
>>>> On 4/18/05, Michael Zurke <mischa@zurke.info
>>     <mailto:mischa@zurke.info>> wrote:
>>>> 
>>>>> is it somehow possible to cancel an executed query via SQLMaps?
>>>>> as far as i know PreparedStatement has a cancel() method for
>>     that puropse.
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Brice Ruth
>>>> Software Engineer, Madison WI
>>> 
>>> 
>> 
>> 
>> 
>> 
>> -- 
>> Brice Ruth
>> Software Engineer, Madison WI



Mime
View raw message