logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: [jira] Updated: (DERBY-31) Statement.setQueryTimeout() support.: msg#00339

apache.db.derby.devel

Subject: Re: [jira] Updated: (DERBY-31) Statement.setQueryTimeout() support.

Shreyas Kaushik wrote:
> Please see below for my replies.
>
> ~ Shreyas
>
> Daniel John Debrunner wrote:

>> I think a detailed explanation of what you believe cancel and
>> setQueryTimeout functionality should be would be very useful. I'm not
>> sure closing the activation actually results in the expected behaviour.
>>
>>
> setQueryTimeout should go set the time until which a Query can execute
> after the executeQuery
> is called. In other words it specifies what is the upper limit for me to
> fetch the data.

Can you explain your reasoning behind this. The only guidance I see is
from the javadoc which does not mention anything about the application.
Maybe it is explained more in the tutorial book?

>From javadoc 1.4.2

public void setQueryTimeout(int seconds)
throws SQLException

Sets the number of seconds the driver will wait for a Statement object
to execute to the given number of seconds. If the limit is exceeded, an
SQLException is thrown.


> Regarding the cancel() it is same as what JDBC spec says. One thread
> should be able to cancel the execution
> of a statement from another thread. When query times or otherwise a call
> to cancel() should stop the execution
> of a statement and clear up all resources.

Having cancel() call System.exit() would fulfill your description of the
functionality, but would probably not be what people would expect. :-)

How does a cancel affect the thread that is executing the statement,
what is the affect on the state of the database, connection or
transaction, statement, jdbc objects etc? What happens if the statement
isn't executing, or has a result set open but is not active in Derby?
These are the issues that need to be thought about and written down.

My guess is that the people who have been active on this discussion may
each have a slightly different (or completely different) idea of what a
cancel does, given it is not completely defined by the JDBC spec. Anyone
looking at your patch cannot begin to review it until they understand
what *detailed* functionality you believe your are implementing. Then
there may be discussions on is it the required functionality, and does
the patch actually implement the intended functionality.


Dan.






<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo