W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: [WebStorage] Concerns on spec section 'Processing Model'

From: Aaron Boodman <aa@google.com>
Date: Fri, 24 Jul 2009 16:58:51 -0700
Message-ID: <278fd46c0907241658r67d73cd5n567f43fe20a80a3b@mail.gmail.com>
To: "Nikunj R. Mehta" <nikunj.mehta@oracle.com>
Cc: Ian Hickson <ian@hixie.ch>, public-webapps WG <public-webapps@w3.org>, Laxmi Narsimha Rao Oruganti <Laxmi.Oruganti@microsoft.com>
On Fri, Jul 24, 2009 at 4:45 PM, Nikunj R. Mehta<nikunj.mehta@oracle.com> wrote:
>> No. The transaction is not closed on GC, it is closed when the last
>> statement that is part of the transaction completes. So holding a
>> reference to the tx variable does nothing one way or the other. The
>> only way to hang the transaction open would be to execute statements
>> over and over.
> A transaction is not complete until I either commit or rollback the
> transaction, which I can choose to do as late as I want to, e.g., at
> window.onclose. Therefore locks on the database will not be released for as
> long as the application wants to hold on to the transaction.

I don't think that this is true, at least in the Database interface:

There is no explicit commit() method. The commit happens implicitly
after all queued statements have been executed successfully.

It does appear that it is possible to hold a transaction open all day
with the DatabaseSync interface
(http://dev.w3.org/html5/webdatabase/#databasesync). Specifically the
SQLTransactionSync method has commit/rollback methods. The
DatabaseSync interface was added after I worked on this, so I can't
say why it doesn't use callbacks.

In any case, I was talking about the async flavor which is what my
example code referred to. Do you agree it is not possible to hang
transactions open from Database
(http://dev.w3.org/html5/webdatabase/#database)? If not, what am I

- a
Received on Friday, 24 July 2009 23:59:35 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:18 UTC