Java RMI By William Grosso This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated May 09, 2003. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification Confirmed errors: {xvii} First Paragraph; "There's an awful lot of code that handles the interactions between the client and the server" should probably indicate whose code it is. "The JDK contains a lot of classes to handle interactions between clients and servers" probably works better. {xvii} The summaries of Chapters 19 and 20 don't contain a "This chapter ...." sentence (unlike the rest of the chapter summaries). It's a minor break in the parallel structure. {xxii} The "how to contact us section" is still jarring The rest of the preface is written in first person singular. The how to contact us section is not. I understand it's boilerplate text that gets inserted as a matter of course, but it's still very very awkward. {xxii} Discussion of the RMI mailing list. "All levels, from beginner to advanced, are discussed here." Yuck. I wrote "All topics, from beginner to advanced, are discussed here." My sentence is awkward, the final sentence is just plain wrong (ain't nobody discussing levels, mon frer). {46} 2nd paragraph "After this code executes, the instance of SSLServerSocket returned by createServer( ) is ..." Should say - "After this code executes, the instance of SSLServerSocket returned by createServerSocket( ) is ..." (47) heading "Revisiting Our Web Browswer" should say "Revisiting Our Web Server" {58} code example, 3rd line from the bottom Line beginning with "BufferedReader reader ..." can be removed (75) example 4-1 NullPrinter.java; Public NullPrinter(OutputStream log) hrows RemoteException Should be: Public NullPrinter(OutputStream log) throws RemoteException {77} The zero argument constructor is not necessary for serialization in PrinterException (it won't be called during deserialization). (78) footnote; "This is a generic exception because it covers wide range of devices." should be: "This is a generic exception because it covers a wide range of devices."" (86) IN PRINT: "The Basic Use Case" section, point 6; "...her identitification card." SHOULD BE: "...her identification card." {108-109} "How Easy..." Section No italicised "Advantage" line for this section {130} line 2; "this(cents.intValue()" Should be: "this(cents.intValue())" {130} line 6; public Money(int cents) { super(dollars + " dollars " + cents + " cents. "); _cents = cents; } variable dollars is not defined Should be public Money (int cents) { super(cents + " cents."); _cents = cents; } {130} line 31; public boolean equals(Object object) { if(object instanceof Money) { return (_cents == otherMoney.getCents()); } variable otherMoney is not defined. Should be: public boolean equals(Object object) { if(object instanceof Money) { Money otherMoney = (Money)object; return (_cents == otherMoney.getCents()); } {146} middle of the page Batch file should be - start rmiregistry start java com.ora.rmibook.chapter9.applications.ImplLauncher Bob 10000 Alex 1223 {147} 3rd method, 4th line; Since the arguments are expected to be name/cents pairs, not name/dollars/cents triplets, the loop in the getNameBalancePairs() method should be incremented by "i+=2" instead of "i+=3". (151) code sample in second paragraph; The first line of code in the constructor for PositiveMoney, calling the superclass constructor, is: super(cents,) it should be: super(cents) (164) 3rd paragraph; At the end of the third paragraph, "call the readObject() object" should be "call the readObject() method". {166} Second paragraph; The author says, "In fact, reset(), close(), and flush() are standard stream methods." reset() is NOT a standard method for an output stream, which is what is being discussed. reset() is a standard method, but only for input streams. (168) 2nd paragraph of "The stream manipulation methods"; The second paragraph of the "stream manipulation methods" section says: "Of these, available() and skip() are methods first defined on InputStream." It should say: "Of these, available() and close() are methods first defined on InputStream." {169} Second from last paragraph; java.io.File does in fact implement the java.io.Serializable interface, contrary to what the book says. AUTHOR: Actually, I don't say that File isn't serializable. I say that the serialization of File is not at all obvious. Nonetheless, it could have been written more clearly. {171} First paragraph; It says that arrays in Java are not serializable, but they are. {188} 2nd Bullet Point, Top of Page; it says "...except private, static, and private transient". it should say: "...except private static and private transient". {193} Middle of page; The sentence "Serializable can frequently be implemented by doing two things ..." should be replaced by "Implementing the Serializable interface is often trivial-- simply declaring that a class implements the Serializable interface is usually all that is required." (208) Numbered list element "5."; in the Mary & Rachel account example says, "...and the account has either $200 or $400 left in it..." The account has either ($1400-$1200) or ($1400-$900) left in it, so that should be "$200 or $500" instead. (216) word "synchronized" misspelled in makeDeposit declaraion (222) code for abstract class StoppableThread; Public StopppableThread(String threadName, Object arg1 OObject arg2) { should be Public StoppableThread(String threadName, Object arg1 Object arg2) { {225} Block of code in 3rd paragraph; Both of the synchronized methods declared in the third paragraph contain an extra closing curly brace. otherOjbect.method2();} should be: otherOjbect.method2(); and otherOjbect.method1();} should be: otherOjbect.method1(); (233) word "synchronized" misspelled in getBalance declaration word "synchronized" misspelled in makeWithdrawal declaration (226) word "synchronized" misspelled in transferMoney declaration (236) body of resetCounter() method; "_timeUntilLockIsReleased" should be: "_timeLeftUntilLockIsReleased" (237) body of CountDownTimer.run() method; "_timeUntilLockIsReleased" should be: "_timeLeftUntilLockIsReleased" (267) 3rd paragraph; In the second sentence of the third prose paragraph, it says "...then call ThreadedPoo11's..." That should be "ThreadedPool1's" (with a letter "l" and a digit "1", rather than two "1"'s.) {269} 2nd paragraph(excluding note); The second sentence refers to "validateAndReturnObject()", when in fact the method is "validateAndReturn()", with an Object as a parameter. (276) last paragraph; The last complete sentence on the page reads "...; the fact that don't talk about"; that should be "...; the fact that we don't talk about". {280} Figure 13-1 The title bar of the application in this figure says chapter 12. It should say Chapter 13. (329) 4th list item; NameAttrributeSetPair should be: NameAttributeSetPair (356) second code sample; The last line of code in the getBalance() function is "return rreturnValue"; it should be "return returnValue" {361}: System.getProperties().put("java.rmi.serverr.logCalls", "true") should be System.getProperties().put("java.rmi.server.logCalls", "true") {370} middle of page: When, on the other hand, un.rmi.server.exceptionTrace should be When, on the other hand, sun.rmi.server.exceptionTrace >>(423) 2nd paragraph in box; >>Ssuch a policy would block any RMI server listening on a randomly assigned sock >>et. >> >>"Such a policy" >Yes. >>(427) last paragraph of box; >>Bill Joy misspelled as Bill Loy >Yes. >>(436) 4th paragraph in sidebar; >>The This is a high-quality mailing list. >> >>"This is a" >Yes. >>(499) 7th paragraph, first sentence; >>It attempt to connect on port 80 of the... >> >>"It attempts to" > >Yes. >>(509) first paragraph; >>`stub' misspelled as `stun'. >Yes.