by
Always acknowledge a fault.
This will throw those in authority off their guard and give you an opportunity to commit more.
-- Mark Twain
This page contains the technical errata -- those things that are wrong or lead you astray -- in JavaSpaces Principles, Patterns, and Practice. You may also want to view the minor errata list, especially before you email us about an error.
If you find an error in the book, please check to see if it is already known before reporting it. If you do not find it in the list, please mail us the relevant information, including page numbers. All errata will be fixed in the next possible printing.
SharedVar contains a decrement method, which
is not shown or mentioned in the book, but which we make use of
in Chapter 4 in the Counter class. The method works similarly
to the increment method and should present no problems.
decrement method of the
Counter class makes use of a
decrement method in the SharedVar class, which is
contained in the source code but not shown or
mentioned in the book. Nevertheless, this method works similarly
to the increment method, so it should present no problems.
WebCounterClient class, all occurrences of type WebCounter
should be changed to SharedVar (as they are in the downloadable
source code). The lines
private WebCounter counter;
WebCounter template = new WebCounter(url);
counter = (WebCounter) space.take(template, txn, Long.MAX_VALUE);
should be:
private SharedVar counter;
SharedVar template = new SharedVar(url);
counter = (SharedVar) space.take(template, txn, Long.MAX_VALUE);
paint method of the WebCounterClient class, the line
Integer count = counter.getCount();
should be:
Integer count = counter.value;