Head First EJB

Errata for Head First EJB

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page 4
Last paragraph, first sentence

XML is spelled here with a lower-case 'L': "... simply by tweaking an XMl document at deploy-time." 'L' should be upper-case.

Anonymous   
Printed
Page 24
handwriting note on the upright

in this book, we won't use the JAR tool to make the ejb-bar ourselves; the "ejb-bar" should be "ejb-jar"

Anonymous   
Printed
Page 29
java files under advice/src/headfirst

under fourth file folder on bottom row ",java files" should be ".java files".

Anonymous   
Printed
Page 61
paragraph at bottom

The sentence "How does the client call methods it?" should be: "How does the client call methods ON it?"

Anonymous   
Printed
Page 62
1st paragraph

"depends on your understanding what's in this chapter." should be "depends on your understanding of what's in this chapter."

Anonymous   
Printed
Page 94
steps 5 and 6

The order of creation is wrong (and inconsistent with the order as present later in the book): The EJBObject is created BEFORE the bean is created. Steps 5 and 6 are really 3 steps: Now the services kick in and 5: the EJBObject is created 6: the bean is created 6b: the EJBObject stub is returned to the client.

Anonymous   
Printed
Page 101
item #3

The Home container steps in and adds its services. should be: The Home object steps in and adds its services.

Anonymous   
Printed
Page 108

First column heading reads "Stateful Session Beans" It should say: "Stateless Session Beans"

Anonymous   
Printed
Page 125
last line on the page

Says "primtive" should be "primitive"

Anonymous   
Printed
Page 130
A:, second line

"a session bean, he can't call the ..." should be "a session bean, she can't call the ..."

Anonymous   
Printed
Page 137, 138, 141, 151

"EJBObject" interface boxes. "isIdentical(Object o)" should read "isIdentical(EJBObject o)"

Anonymous   
Printed
Page 139
Side notes

2nd Paragraph of the sidebar notes : It has just one method, getEJBObject(), that returns type Object. It should be type "EJBObject".

Anonymous   
Printed
Page 154

Very bottom right "EJBLocalObject" interface box. "isIdentical(Object o)" should read "isIdentical(EJBLocalObject o)"

Anonymous   
Printed
Page 160
4th line in the last note

Note says "getAdvice() doesn't declare any excpetions,". "excpetions" should be "exceptions"

Anonymous   
Printed
Page 163
2nd diagram

The text inside the second diagram, which reads "BEFORE: 1 dog, 2 references" should read "AFTER: 1 dog, 2 references"

Anonymous   
Printed
Page 175
objective 3.5, line 2

identify misspelled as "indentify"

Anonymous   
Printed
Page 175
Offical objective 3.6, at the end

The last expression ', remote component interface' should be ', local home interface' otherwise the remote component interface is mentioned twice and local home interface never.

Anonymous   
Printed
Page 222
Stateful session beans , last bullet point

says: "...or the bean times out)" should be: "...or the bean times out, or the bean throws a system exception)"

Anonymous   
Printed
Page 235
all over

The numbering of the rules is wrong: 1, 2, 3, 2, 3, 4 instead of 1 to 6

Anonymous   
Printed
Page 239
above the Bean Provider image

invoking ejbPassivate() is printed as invoking ebjPassivate()

Anonymous   
Printed
Page 246
Question 8

C. The provider must close any database connections before ejbPassivate() completes. should say: C. The provider must not close any database connections before ejbPassivate() completes.

Anonymous   
Printed
Page 246
question 8, option E

instead of "...will be not survive passivation..." should read: "...will not survive passivation..."

Anonymous   
Printed
Page 247
Question 10, Method E

The interface javax.ejb.SessionContext contains no method named getRollBackOnly. But it contains a method with the name getRollbackOnly. The Answer on page 254 has the same typo.

Anonymous   
Printed
Page 261
1st sentence in 1st paragraph

Change "An entity bean is an object-oriented way of looking at in a persistent store." should be: "An entity bean is an object-oriented way of looking at a persistent store."

Anonymous   
Printed
Page 268
Method getFirstName()

On page 268, the method getFirstName() returns the lastName instead of the firstName. public String getFirstName() { return lastName; } should be public String getFirstName() { return firstName; }

Anonymous   
Printed
Page 285
3rd Paragraph on left, 6th line

"S ometimes" should read "Sometimes"

Anonymous   
Printed
Page 296
What it really means: 1st paragraph, 4th line

change "javax.ejbEntityBean" TO "javax.ejb.EntityBean"

Anonymous   
Printed
Page 296
right column, second paragraph, fourth line

says "heal-living objects" and should be "heap-living objects".

Anonymous   
Printed
Page 301
step 4 paragraph, third line

says "nobody can except the bean can change" and should be "nobody except the bean can change".

Anonymous   
Printed
Page 304
Answer to the 'Dumb Question' in the right column

The third sentence in the first paragraph of the answer to the question "Doesn't BMP give you more control?" reads: "Things like ganging multiple calls to the database, using native code to get in an out of the database faster than you could, ..." it should be: "Things like ganging multiple calls to the database, using native code to get in and out of the database faster than you could, ..."

Anonymous   
Printed
Page 331
middle of page

Book says: "When ejbCreate(), the Container..." should be: "When ejbCreate() completes, the Container..."

Anonymous   
Printed
Page 333
1st paragraph in the right side notes

An extra "the" in the 1st paragraph in the right side notes. "By the end of ejbCreate(), you must have a valid primary key assigned to the CMP field that you've the told the..." should be: "By the end of ejbCreate(), you must have a valid primary key assigned to the CMP field that you've told the..."

Anonymous   
Printed
Page 334
Last sentence in second paragraph

...access to your EJB object (or something else that can happen only in ejbPostCreate(), and not in ejbCreate(). should be: ...access to your EJB object (or something else that can happen only in ejbPostCreate(), and not in ejbCreate()).

Anonymous   
Printed
Page 335
public Customer create(...) throws CreateException, RemoteException)

There is a ')' that doesn't belong after a RemoteException declaration in the create() method of the Home Interface.

Anonymous   
Printed
Page 351

There are two #7 steps and no #5 step.

Anonymous   
Printed
Page 352
Last line of page

Line says "The Container can call ejbStore() and ejbStore() at other times" should be "The Container can call ejbLoad() and ejbStore() at other times"

Anonymous   
Printed
Page 356
3rd Paragraph

In the 3rd paragraph, "Commit option C": "... - a bean comes out of the pool, is activated, the loaded,..." It should be "... - a bean comes out of the pool, is activated, then loaded,..."

Anonymous   
Printed
Page 357
First "Q:"

Change "How does these commit options affect me?" TO: "How do these commit options affect me?"

Anonymous   
Printed
Page 358
3rd answer, 2nd paragraph

"... have to be certain that all instances of that entity bean in sync, not just with..." should be: "... have to be certain that all instances of that entity bean are in sync, not just with..."

Anonymous   
Printed
Page 369
Question 9

The answer to question 9 should not have B checked. The EBJObject is not available during an entity bean's ebjCreate()

Anonymous   
Printed
Page 373
last line

(think: vendor/databse independent) should be: (think: vendor/database independent)

Anonymous   
Printed
Page 374
1st paragraph on right

"container-managed persistent (CMR) fields" should be "container-managed relationship (CMR) fields"

Anonymous   
Printed
Page 379
2nd paragraph.

"What is the database..." should read "What if the database..."

Anonymous   
Printed
Page 382
1st paragraph

return type of getDirector() is Director() should be return type of getDirector() is Director

Anonymous   
Printed
Page 389
"handwritten" note for point A-1

The second sentence in the note reads: "Se we expect that Director will have a CMR field with a Collection type rather than a single Movie" It should read: "So we expect that Director will have a CMR field with a Collection type rather than a single Movie."

Anonymous   
Printed
Page 389
"handwritten" note for point A-3

The "<cmr-field-type>" tag after the end of the sentence was inadvertent and can be removed

Anonymous   
Printed
Page 394
Second "handwritten" note on the right side of the page

The last sentence in the note is missing a period at the end.

Anonymous   
Printed
Page 401
first paragraph, second line

says "lets you write SQL-like statements write into the" should be "lets you write SQL-like statements right into the"

Anonymous   
Printed
Page 402
2nd subheader

"In the the deployment descriptor" should read "In the deployment descriptor"

Anonymous   
Printed
Page 403
Method header

Looks like the header got copied from the previous page. The header should be: public abstract Collection findByGenre(String genre) throws FinderException;

Anonymous   
Printed
Page 415
The handwritten note in the middle left of the page

The last sentence of the note reads: The query returns a set (no duplicates because we said "DISTINCT" of Directors it should be: The query returns a set (no duplicates because we said "DISTINCT" of Directors).

Anonymous   
Printed
Page 419
second handwritten note, third line

(Hey, phone numbers can to be Strings, they... should be (Hey, phone numbers can be Strings, they...

Anonymous   
Printed
Page 420
7th bullet point

missing second double quotation mark after "abstract-persistence-schema"

Anonymous   
Printed
Page 424
last hand-written note

says "returns Movie1, not that it has been assigned" should be "returns Movie1, now that it has been assigned"

Anonymous   
Printed
Page 426
q4, answer c

Answer c b1.getBar() = null should be b1.getFoo() = null

Anonymous   
Printed
Page 426
question 4, last choice

says "E. none of the above" and should be "D. none of the above".

Anonymous   
Printed
Page 437
last line

"and the container give it to a ...." should say "and the container gives it to a ..."

Anonymous   
Printed
Page 438
2nd paragraph.

"The only different is..." should read "The only difference is..."

Anonymous   
Printed
Page 438
right column, eighth line from the top

says "have a very simply lifecycle" should be "hava a very simple lifecycle".

Anonymous   
Printed
Page 442
1st line

Client (Producer) send a message... Should read Client (Producer) sends a message...

Anonymous   
Printed
Page 443
First line

First line reads: "4. Container invokes the beans onMessage() method..." Should read: "4. Container invokes the bean's onMessage() method..."

Anonymous   
Printed
Page 446
4th note

MessageDrivenContext extends EJBObject Should be MessageDrivenContext extends EJBContext

Anonymous   
Printed
Page 448
1st paragraph

The statement "The class must implement javax.ejb.MessageDrivenBean and javax.ejb.MessageListener" should read "The class must implement javax.ejb.MessageDrivenBean and javax.jms.MessageListener"

Anonymous   
Printed
Page 450
last line

"..., os you simply won't see it." should read "..., or you simply won't see it."

Anonymous   
Printed
Page 482
second figure

The comment "Transactions are suspended when they get to a BMP Bean" should say "Transactions are suspended when they get to a BMT Bean"

Anonymous   
Printed
Page 500
the last paragraph in the left "BANG" note

.....which means you MUST use only: *Requires *RequiresNew *Mandatory should be: .....which means you MUST use only: *Required *RequiresNew *Mandatory

Anonymous   
Printed
Page 500
top-right 'watch-it' heading

says "TWO attributes: Requires..." should be "TWO attributes: Required..."

Anonymous   
Printed
Page 504
handwritten note

In the handwritten note at the bottom of the page, the 2 occurrences of Requires should be Required

Anonymous   
Printed
Page 505
<trans-attribute>tag in the 2nd <container-transaction> at the bottom of the page

<trans-attribute>Requires</trans-attribute> should be: <trans-attribute>Required</trans-attribute>

Anonymous   
Printed
Page 508
left column, 6th bullet

The book says: " ...to acknowledge a method..." Should be: " ...to acknowledge a message..."

Anonymous   
Printed
Page 513
questons section line 13

"using a session bean as as a " should be: "using a session bean as a "

Anonymous   
Printed
Page 513
Top left corner

Reads: "... because stateless session bean's aren't allowed to maintain..." Should read: "... because stateless session beans aren't allowed to maintain..."

Anonymous   
Printed
Page 529
second paragraph, 8th line

says "that nows how to deal" and should be "that knows how to deal"

Anonymous   
Printed
Page 543
Both code examples

Reads: "public interface BadService extend EJBLocalObject" Should read: "public interface BadService extends EJBLocalObject" Reads: "public interface GoodService extend EJBLocalObject" Should read: "public interface GoodService extends EJBLocalObject"

Anonymous   
Printed
Page 549
Under paragraph titled "Finder Exception" last line

"datbase" should be: "database"

Anonymous   
Printed
Page 550
First "answer" section on the page

"any bean with overloaded creates (or it's only create has args)" should read "any bean with overloaded creates (or its only create has args)"

Anonymous   
Printed
Page 553
speech bubble

"On, and let me guess--" should be "Oh, and let me guess--"

Anonymous   
Printed
Page 554
the sixth line from the bottom

NoSuchObectException is when the client still has a stub to ... NoSuchObectException should be NoSuchObjectException. It is missing a 'j'

Anonymous   
Printed
Page 557
Second heading

The heading- Transaction should be Exceptions

Anonymous   
Printed
Page 557, 560
4th scenario

A session bean has no any means to call getPrimaryKey() on its context, since the SessionContext and EJBContext interfaces did not define getPrimatyKey(). A session bean can call it only on its EJBObject, and RemoteException or EJBException will be thrown.

Anonymous   
Printed
Page 559
4th scenario, 2nd line of solution

Within the (): the word should be "remote" instead of "local" (it throws a RemoteException)

Anonymous   
Printed
Page 571
ChangePay UML Diagram

reinburse() method should be reimburse()

Anonymous   
Printed
Page 599
Sixth sentence in the paragraph at the bottom of the page

"Maybe you hard-coded a tax-rate (remember-bean's can't access property files)." should be: "Maybe you hard-coded a tax-rate (remember-beans can't access property files)."

Anonymous   
Printed
Page 610
first left-margin hand-written note

says "not the read DB name" and should be "not the real DB name"

Anonymous   
Printed
Page 610
Second handwriting on the left side

In the book, concerning res-auth element value: "Either the Bean or the Container" should be: "Either the Application or Container" EJB spec. (p.423) says: "The Bean Provider indicates the sign-on responsibility by setting the value of the res-auth element to Application or Container."

Anonymous   
Printed
Page 611
headline half way down the page

"Resource Authorization" should read: "Resource Authentication".

Anonymous   
Printed
Page 611
bullet item 1 near bottom of page

"Container authorization means" should read: "Container authentication means"

Anonymous   
Printed
Page 611
bullet item 2 at bottom of page

"Application authorization means" should read: "Application authentication means"

Anonymous   
Printed
Page 611
Res Type 4

Text reads "<res-type>javax.net.URL</res-type>" Should read "<res-type>java.net.URL</res-type>"

Anonymous   
Printed
Page 614
The first "Watch It!" section, in title and first line

"<res-ref-type> must NOT..." Should be "<ejb-ref-type> must NOT..."

Anonymous   
Printed
Page 614

2nd "Watch It!" section. "But is is SO..." should read "But it is SO..."

Anonymous   
Printed
Page 615
first paragraph, first line

says "one bean's EJB reference it to another bean" should be "one bean's EJB references another bean"

Anonymous   
Printed
Page 618
Security topic - first bullet

Change assign of the security domain and principal realm to the app TO: assign the security domain and principal realm to the app

Anonymous   
Printed
Page 620
first paragraph, first line

says "bean'sspecial" and should be "bean's special"

Anonymous   
Printed
Page 620
Guaranteed APIs section

"You must which..." Should say: "You must know which..."

Anonymous