A couple of questions regarding client state vs. server state on several calls. 
 What should be the client behavior for subsequent calls after a transaction 
abort is called?  This assumes the server request hasn't been processed yet.  
For example:

1.        var txn = db.transaction([osName], IDBTransaction.READ_WRITE);
2.        objStore = txn.objectStore(osName);
3.        var rq = objStore.add(books[2]).onsuccess = function (e1) { 
log("added book 2"); };
4.        txn.abort();
5.        try {
6.                 var rq2 = objStore.add(books[3]).onerror = function (e2) { 
log("failed to add book 3"); };
7.        catch (ex) {
8.         log ("TRANSACTION_INACTIVE_ERR");
9.        }

I expect that line #3 will receive the success event.  However, I expect that 
rq2 will throw a TRANSACTION_INACTIVE_ERR that will be processed by line #7 and 
that the onerror function will never be called on line #6.  My assumption is 
that even if the transaction abort hasn't been processed by the server, that 
the client state associated with the transaction will contain an invalid 
transaction and thus fail.

Do you agree?

Israel

Reply via email to