The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.


I am in reference to the page 262 and figure 11.1 describing the lost update transaction isolation issue.

Can someone please why the figure indicates that the commit (.3) takes place before the rollback (.4)?

Isn't the figure meant to read the other way round (rollback before commit)?

Please don't hesitate to reply...

P.S. where is the errata by the way?
It seems it is rather a mistake on my part.
Can one of the authors please state whether or not the following is a typo/error?

See my post here:
I have an interrogation about page 302 section 12.2.4:

            for (Item item : items) {
                assertTrue(item.getBids().size() > 0);
                // select * from BID where ITEM_ID in (
                //  select ID from ITEM
                // )

My question is about the specific subselect i.e.
select ID from ITEM

Is this not going to return the whole ITEM table IDs?

If that is indeed the case, is it really an optimization to do so?
1. I would like to know whether the examples are based on Mockito or Easymock.
2. I'd also like to know whether examples about Spring are included in the book.
Good to learn that!! I really like the second edition and I'll monitor the Manning website to see the progress of the third edition.
Thanks for this quick reply,
I own a copy of jQuery in action, Second Edition which covers jQuery 1.4. I was just wondering if a third edition (covering the latest jQuery features) was planned...
> The i++ in the loop keeps being executed, moving i
> from 0 to 1 and then from 1 to 2, at which point the
> condition check i < div.length returns false and the
> loop ends. So i finishes with the value 2.
> The inner function maintains a reference to i so that
> when the click event fires the value "2" is logged.
> Again, that's when the click event fires i has the
> value 2.

Thanks a lot for your reply.
What I still don't understand is what code sets it moving from 1 to 2 and when...
Hello Bear,
            var div = document.getElementsByTagName("div");
            for ( var i = 0; i < div.length; i++) {
                div[i].addEventListener("click", function(){
                    console.log("div #" + i + " was clicked.");
                }, false);


Message was edited by:
I get it now.
Thanks a lot.
Hello John and Bear,

Congratulations on this great book to both of you.

I have run the example/listing 4.19 and I am still not clear where and when in the code the final update to value "2" of variable "i" occurs.

Can one of you please clarify?

Thanks in advance,


Message was edited by:

Message was edited by: