Errata

Enterprise JavaBeans 3.0

Errata for Enterprise JavaBeans 3.0

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page xxii
Line below "Chapter 18,..."

The line reads as follows:
"This chapter explains the XML, SOAP, WSLD and UDDI web services standards."

WSLD => WSDL

Anonymous   
Printed Page xxii
Line below "Chapter 18,..."

The line reads as follows:
"This chapter explains the XML, SOAP, WSLD and UDDI web services standards."

Anonymous  May 16, 2008 
Other Digital Version ex07_*
build.xml

Ant build.xml files have unneeded reference to ${jboss.home}/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs commons-collections.jar. This is not needed for the build. Also since this is not a standard files with JBoss 4.x, the build will fail as a result. A work-around is to comment out this classpath requirement.

Dan Becker  Feb 20, 2009 
Other Digital Version ex0*
All build.xml scripts

Ant build.xml scripts only work with JBoss 4.x. They fail with JBoss 5.x. A work-around is to change paths from server/default/deploy/ to server/default/deployer/.

Dan Becker  Feb 20, 2009 
Other Digital Version ex11_3
ejb-jar.xml

The provided example 11_3 of the JBoss workbook is not deployable due to following errors:
The "env-entry" must be specified before "resource-ref".
See http://java.sun.com/xml/ns/javaee/javaee_5.xsd in
<xsd:group name="jndiEnvironmentRefsGroup">

Also instead of
<remote>com.titan.processpayment.ProcessPaymentRemote<remote>
<local>com.titan.processpayment.ProcessPaymentLocal<local>
it must read
<business-local>com.titan.processpayment.ProcessPaymentLocal<business-local>
<business-remote>com.titan.processpayment.ProcessPaymentRemote<business-remote>
because the session bean has EJB 3.0 business interfaces.
See http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd in <xsd:complexType name="session-beanType">

Andreas Schreiber  Jun 24, 2010 
Printed Page 11 and 12
page 11 paragraph 4 conflicts with page 12 paragraph 3

Page 11 paragraph 4 states "... entities can be ... serialized ...".
Page 12 paragraph 3 states that the Bean class "... does not have to ... even be serializable".

This is confusing. Perhaps page 11 paragraph 4 can be changed to indicate that an entity can be serialized, but that this is not required.

I look forward to reading the rest of the book.

Anonymous  Aug 25, 2008 
Printed Page 24
Bottom of page, setCustomer() method

entityManager.create(cust)
should be
entityManager.persist(cust)

Anonymous   
Printed Page 27
in the example at the bottom

Variables cruisePk and cabinPk are referenced as cruisePK and cabinPK, respectively, on the following page (28).

Anonymous  Jun 16, 2009 
Printed Page 28
Code example

entityManager.create(reservation);
should be
entityManager.persist(reservation);

Anonymous   
Printed Page 28
top of page, source code

In the "Message-Driven Beans" section that starts on page 27, the example code, which continues through the top of page 28, contains an error.

On page 28, it states:

Reservation reservation = new Reservation(customer, cruise, cabin, price, new Date());

entityManager.create(reservation);

However, in the Java EE 5 SDK, the interface 'EntityManager' does not contain a method "create(Object)".

Anonymous  Mar 06, 2009 
Printed Page 28
Code example on the top of the page

The line

Cabin cabin = entityManager.find(Cabin.class, cruisePK);

should be

Cabin cabin = entityManager.find(Cabin.class, cabinPk);

Szabolcs Andrasi  Oct 18, 2009 
Printed Page 54
First paragraph

"The <name> element represents the set of classes" ...
should describe the name attribute, not element; <name> is not an element in the XML
appearing above the text (on the previous page), it's an attribute on the
persistence-unit element.

Anonymous   
Printed Page 57
Figure 4-2

The titan.jar content is wrong. It should contain TravelAgentBean.class instead of
TravelAgentBean.java. Also META-INF/persistence.xml (and MANIFEST.MF) is missing in
the diagram.

Anonymous   
Printed Page 57
Figure 4-2

There is no "dev" directory of titan.jar, so the first box should be removed or
renamed to "/" (the root of the file). Also, a box with the name "META-INF" should be
added to the root folder and list the file "persistence.xml" as contents.

Anonymous   
Printed Page 60
second-to-last paragraph

p. 58:
Object ref = jndiContext.lookup("TravelAgentBean/remote");
TravelAgentRemote dao = (TravelAgentRemote)
PortableRemoteObject.narrow(ref,TravelAgentRemote.class);

p. 60:
Object ref = jndiContext.lookup("TravelAgentRemote");
CabinHomeRemote home = (TravelAgentRemote)
PortableRemoteObject.narrow(ref,TravelAgentRemote.class);

Not sure about this, but I think the "CabinHomeRemote" interface on page 60 is left
over from an earlier edition of the book (and EJB spec). I think it should be
"TravelAgentRemote", as it is on page 58.

Anonymous   
Printed Page 60
Code snippet near bottom of page

Object ref = jndiContext.lookup("TravelAgentRemote");

should be:

Object ref = jndiContext.lookup("TravelAgentBean/remote");

Anonymous   
Printed Page 68
Figure 5-1

There is no "dev" directory of titan-persistence.jar, so the first box should be
removed or renamed to "/" (the root of the file).

Anonymous   
Printed Page 69
4rd paragraph, mid-page

javax.persistence.PersistenceProvider
must be
javax.persistence.spi.PersistenceProvider

Anonymous   
Printed Page 76
2nd code example

Custom cust = new Customer();
should be
Customer cust = new Customer();

Anonymous   
Printed Page 76
2nd paragraph

EntityManagerFactor API, you must call Entity.Manager.joinTransaction()

should be

EntityManagerFactory API, you must call EntityManager.joinTransaction()

Andreas Schreiber  Jun 11, 2010 
Printed Page 77
top paragraph

the second sentence, "TransactionRequiredException is thrown if this method
is invoked on a transaction-scoped persistence context." should be
"TransactionRequiredException is thrown if this method is NOT invoked on a
transaction-scoped persistence context."

Anonymous   
Printed Page 77
5th paragraph, above last code example

Replace colon with a period at the end of the sentence "So, the constant 2 is converted
to a java.lang.Integer:"
This sentence refers to the code above the paragraph, not below.

Anonymous   
Printed Page 77
2nd to last paragraph

The sentence "and there is no guarantee that the entity's state will be initialized"
doesn't make sense. If the javax.persistence.EntityNotFoundException exception is thrown,
the entity doesn't exist, hence you cannot speak of its state. The value of
the cust variable will still be null.

Anonymous   
Printed Page 77
2nd to last paragraph

According to the API doc, the paragraph should read like:
getReference() differs from find() in that if the entity is not found in the database, the EntityNotFoundException is thrown when the entity's state is first accessed. The persistence provider runtime may also throw the EntityNotFoundException when getReference is called.

Andreas Schreiber  Jun 11, 2010 
Printed Page 78
4th paragraph

There hasn't been introduced any methods named "getResource()", so what the author probably
means is the "getReference()" method of the entity manager.

Anonymous   
Printed Page 79
Second paragraph

It's stated that "the persistence context ends when the findCabin() method finishes,
as it is a single JTA transaction". There is no guarantee that this is the case since
the @TransactionAttribute is "REQUIRED". The method will join any JTA transaction running
when the method is invoked. The statement will only be true if the @TransactionAttribute
has the value "REQUIRES_NEW" in which case a new JTA transaction is started when the method
is invoked.

Anonymous   
Printed Page 80
2nd paragraph, 2nd sentence

Should be "The TransactionRequiredException is thrown if this method is NOT invoked
on a transaction-scoped persistence context."

Anonymous   
Printed Page 80
5th paragraph 2nd sentence

Should be "The TransactionRequiredException is thrown if this method is NOT invoked on a transaction-scoped persistence context."

Andreas Schreiber  Jun 11, 2010 
Printed Page 81
Top of page first line

"removeCabin(int id)"
is probably meant to be
"refreshCabin(int id)"

Anonymous   
Printed Page 81
2nd paragraph, 2nd sentence

Should be "The TransactionRequiredException is thrown if this method is NOT invoked
on a transaction-scoped persistence context."

Anonymous   
Printed Page 82
Bottom of page

The getTransaction() method is not listed on page 75-76.

Anonymous   
Printed Page 90
Second paragraph

Change:
"We also want firstName to have a not-null contraint"
To:
"We also want firstName and lastName to have a not-null contraint".

Anonymous   
Printed Page 90
SQL code example at top of page

create table CUSTOMER_TABLE
{

}

Andreas Schreiber  Jun 09, 2010 
Printed Page 90
SQL code example at top of page

The code example must read:

create table CUSTOMER_TABLE
{
CUST_ID integer primary key not null,
FIRST_NAME varchar(20) not null,
lastName varchar(255)
}

to match the Customer entity class below. Then the text
"We also want firstName to have a not-null constraint and want ..."
does not have to be changed.

Andreas Schreiber  Jun 09, 2010 
Printed Page 95
3rd paragraph

@Id annotation has no generator attribute, @GeneratedValue has a generator attribute to specify the primary key generator

So the text must be: The name() attribute defines the the name of the @TableGenerator and is the name referenced in the @GeneratedValue.generator() attribute.

Anonymous  Apr 08, 2010 
Printed Page 97
2nd paragraph

The name of the sequence generator has to be specified in the @GeneratedValue annotation, not in the @Id.

So the text must be: The name() attribute specifies how this @SequenceGenerator is referenced in the @GeneratedValue annotation.

Anonymous  Apr 08, 2010 
Printed Page 100
Middle of page in XML

<id-class> doesn't use embedded text to set the class name. It uses the class attribute
instead. So instead of

<id-class>com.titan.domain.CustomerPK</id-class>

it should read

<id-class class="com.titan.domain.CustomerPK"/>

Anonymous   
Printed Page 102
Middle of page - code for Customer class

public PK getPk()...
should be
public CustomerPK getPk()...

Anonymous   
Printed Page 103
Top of page - @AttributeOverrides code

There is probably a ")" missing in
@AttributeOverride(name="lastName"....LAST_NAME"),
before the comma

Anonymous   
Printed Page 103
Middle of page - line above xml listing

Let us now look at .... @IdClass:
should probably read
Let us now look at .... @EmbeddedId:

Anonymous   
Printed Page 104
Bottom of page - code example

public PK getPk()...
should probably read
public CustomerPK getPk()...

Anonymous   
Printed Page 105
2nd paragraph

The <transient> element is used within an <attributes> element, not within a <attribute> element.

Anonymous  Apr 08, 2010 
Printed Page 112
Second Paragraph

"The @PrimaryKeyJoinColumn specifies the column in the ADDRESS_TABLE that you will join
with the primary key of the CUSTOMER_TABLE . In this case, it is ADDRESS_ID. We do not
need to specify the referencedColumnName( ) attribute of this annotation because it can
default to the Customer entity's primary-key column."

This paragraph seems to contradict with the first paragraph above it.
1. "join with the primary key of the CUSTOMER_TABLE" ? We are trying to get address, what
does it have to do with the primary key of the CUSTOMER_TABLE?
2. "it can default to the Customer entity's primary-key column"? see 1)

Anonymous   
Printed Page 114
Last paragraph

The paragraph states that "The embedded Address class has the @Column mappings defined
directly within it." This is obviously not the case when looking at the code. The JBoss
example in the "JBoss Workbook" later has the annotations though.

Anonymous   
Printed Page 115
bottom - xml mapping

embeddable class description doesn't have list of attributes.

embeddable element has wrong attribute tag "access-type" - should be "access".

embeddable element should be listed at the end of the xml.

Anonymous   
Printed Page 120
Top of page - Customer entity code listing

private Address address;
should be
private Address homeAddress;
for the get/set functions to work.

Anonymous   
Printed Page 121
Bottom of page - xml listing

<cascade>ALL</cascade>
should be
<cascade-all/>

Anonymous   
Printed Page 127
Java code at end of page

In the method getCreditCard(), "return homeAddress;" should be "return creditCard;".

Anonymous   
Printed Page 129
First paragraph

I believe the use a foreign-key column to implement a one-to-many unidirectional relationship
is not required by JPA 1 (i.e it's a vendor extension). It doesn't work on Toplink Essentials
-- a join table seems to be required.

Anonymous   
Printed Page 129
Figure 7.5

PHONE table foreign key should be CUSTOMER_ID rather than CREDIT_CARD_ID

Anonymous   
Printed Page 129
Figure 7.5

RDBMS PHONE model should have field CUSTOMER_ID INT rather than CREDIT_CARD_ID INT, in order to allow many phone entities to be related to a customer (not credit card).

Dan Becker  Feb 20, 2009 
Printed Page 132
XML mapping

attribute targetEntity should be target-entity.

Andreas Schreiber  Jun 18, 2010 
Printed Page 133
one-to-many element in Xml at bottom of page

attribute targetEntity should be target-entity.

Anonymous   
Printed Page 133
top of page - customer entity code listing

@JoinTable(name="CUSTOMER_PHONE"),
should be
@JoinTable(name="CUSTOMER_PHONE",

Anonymous   
Printed Page 137
Code snippets and text

The code snippets and text on this and other pages throughout the book refer to a
user-provided no-arg constructor as the "default constructor". This is wrong as the
Java Language Specification describes the default constructor as the (no argument)
constructor automatically provided if the class does not contain any (user-provided)
constructors.

I suggest reviewing the text (and code samples) and replacing "default constructor"
and "default no-arg constructor" with "no-arg constructor" as appropriate.

Anonymous   
Printed Page 141
First code sample

The "date" property should be annotated with the
@Temporal(TemporalType.DATE) annotation.

Anonymous   
Printed Page 142
middle of page - cruise entity xml listing

<one-to-many name="ship"
should be
<one-to-many name="reservations"

Anonymous   
Printed Page 144
2nd section of code

@JoinTable(name="Reservation_Customer"),
joinColumns={@JoinColumn(name="Reservation_ID")},
inverseJoinColumns={@JoinColumn(name="Customer_ID")})

should read:

@JoinTable(name="Reservation_Customer",
joinColumns={@JoinColumn(name="Reservation_ID")},
inverseJoinColumns={@JoinColumn(name="Customer_ID")})

Anonymous   
Printed Page 144
Middle of page, code sample

The method "public void setCustomers(Set customers);" should be
changed to "public void setCustomers(Set<Customer> customers)"
and have a method body like "{ this.customers = customers; }".

Anonymous   
Printed Page 146
top of page - customer entity xml listing

<many-to-many name="cruise"
should be
<many-to-many name="reservations"

Anonymous   
Printed Page 148
Source middle

Set<Cabin> should read as Map<Cabin>

two occurrences

Anonymous   
Printed Page 148
in unconfirmed errata

I disagree with the unconfirmed errata.
Set<Cabin> is correct in its usage.
Set is used for the reason described on page 144 second to last paragraph (for Reservation's
collection of Customers).

Anonymous   
Printed Page 151
middle of page - reservation entity code listing

public void setCustomers(Set Customers);
should not have semicolon - as this line is probably part of function definition and
not a declaration

Anonymous   
Printed Page 151
Middle of page

The method
"public void setCustomers(Set customers);"
should be changed to
"public void setCustomers(Set<Customer> customers)".

A current correction has already stated that the method should have a
method body like on p144.

Anonymous   
Printed Page 151
code example, middle of page (same place as previous errata)

should setCustomers(Set customers)
be
setCustomers(List<Customer> customers)
or
should the text explain why set it being used

This is the first example of a List-based collection.

Anonymous   
Printed Page 153
Bottom of page

According to the EJB3 specification, FetchType.LAZY is only a hint
and may not be honored by the persistence provider, therefore the
relationship may be eagerly fetched.

Anonymous   
Printed Page 154
bottom code example

Customer cust is defined but Customer customer is used instead.

"customer.setAddress(new Address());"
should be
"cust.setAddress(new Address());"

"customer.setPhoneNumbers().add(new Phone());"
should be
"cust.setPhoneNumbers().add(new Phone());"

Anonymous   
Printed Page 161
code example, middle of page

declaration needs opening brace

public @interface DiscriminatorColumn
public @interface DiscriminatorColumn {

Anonymous   
Printed Page 168
middle of page - Customer entity listing

@AttributeOverride(name="lastname",...
should be
@AttributeOverride(name="lastName",...

Anonymous   
Printed Page 169
XML code fragment

</entity> tag after <mapped-superclass> is superfluous

Anonymous  Apr 13, 2010 
Printed Page 171
Code sample, bottom of page

entityManager.creatQuery( should be entityManager.createQuery(

Anonymous   
Printed Page 171
last codeblock

The query "from Customer c" is incorrect.
It is correct Hibernate hql, not correct jpql/ejbql.
Correct syntax it "select c from Customer c".

Identical error also appears in the last codeblock on page 172 and
the first one on page 173.

Anonymous   
Printed Page 172
first paragraph line 4

I have noticed a typo in this book at page number 172 in chapter 9. It says Query#getSingleResult() throws javax.persistence.EntityNotFoundException If no result returned. But this is not true, Query.getSingleResult() throws javax.persistence.NoResultException if there is no result. This is as per the Docs given by Sun.

Anonymous   
Printed Page 172
3rd paragraph

In the first line of the first code example on page 172 it should read

"Query query = entityManager.createQuery("

instead of

"Query query = entityManager.creatQuery(" .

Anonymous   
Printed Page 172
1st paragraph

3rd & 4th line: If no result is returned then javax.persistence.NoResultException is thrown,
not EntityNotFoundException, as described in the book. The code excerpt on previous page also
contains the same logical error

Found on testing with JBOSS 4.2.GA

Anonymous   
Printed Page 172
first paragraph line 4

I have noticed a typo in this book at page number 172 in chapter 9. It says Query#getSingleResult() throws javax.persistence.EntityNotFoundException If no result returned. But this is not true, Query.getSingleResult() throws javax.persistence.NoResultException if there is no result. This is as per the Docs given by Sun.

Anonymous  Jun 04, 2008 
Printed Page 184
top of page - section "Using DISTINCT"

SELECT res FROM ...
should be
SELECT cust FROM ...

Anonymous   
Printed Page 185
Third-to-last paragraph

Change "Reservation EJBs" to "Reservation entities".

Anonymous   
Printed Page 194
Third paragraph

The paragraph mentions CMR fields and CMP fields which don't exist in EJB3.

Anonymous   
Printed Page 195
Middle of page

In the code example, replace "SELECT DISTINCT COUNT(c.address.zip)" with
"SELECT COUNT(DISTINCT c.address.zip)".

Anonymous   
Printed Page 200
middle of page; Section: EXISTS; query listing

...(SELECT res FROM cr.reservations WHERE ...
should be
...(SELECT res FROM cr.reservations res WHERE ...

Anonymous   
Printed Page 203
Middle of page; XML listing

<entity-result entity-class="com.titan.domain.CreditCard"/>
should be
<entity-result entity-class="com.titan.domain.CreditCard">

Anonymous   
Printed Page 203
Bottom of page; Java example

@SqlResultSetMapping(name="reservationCount",
entities=@EntityResult(name="com.titan.domain.Cruise",
fields=@FieldResult(name="id",column="id")),
columns=@ColumnResult(name="resCount"))

should be

@SqlResultSetMapping(name="reservationCount",
entities={@EntityResult(entityClass=Cruise.class,
fields={@FieldResult(name="id",column="id")})},
columns={@ColumnResult(name="resCount")})


Anonymous   
Printed Page 203
Bottom of page; Java example

I disagree with the unconfirmed errata:

@SqlResultSetMapping(name="reservationCount",
entities=@EntityResult(name="com.titan.domain.Cruise",
fields=@FieldResult(name="id",column="id")),
columns=@ColumnResult(name="resCount"))

is correct, because the {} can be omitted if only one element of an array is specified.

Andreas Schreiber  Jun 18, 2010 
Printed Page 205
Top of page query example

FROM Cruise As c, JOIN c.reservations r

comma may be extra - should be

FROM Cruise As c JOIN c.reservations r

Anonymous   
Printed Page 205
Middle of page

Change
Query.setParameter("cruise", cruise);
to
query.setParameter("cruise", cruise);

Anonymous   
Printed Page 206
Bottom of page; XML listing

result-set-mapping="customerAndCCNumMapping"/>

should be

result-set-mapping="customerAndCCNumMapping">


Anonymous   
Printed Page 209
Bottom, Code

afterInsert() should read as beforeInsert()

Anonymous   
Printed Page 210
Bottom

beforeInsert() should read as afterInsert()

(218pp) Headline starting "Domain objects";
The book uses the term "domain object" to denote types of objects that
typically are "transfer objects" (or in some cases possibly "value objects")
in the sense of Patterns of Enterprise Applications (Fowler).

While I understand the desire to avoid terms that are too close to
"data transfer object" as used in EJB 2.x contexts, I believe that the choice
of "domain object" is unfortunate in this case.

The EJB 3.0 spec states: "An entity is a lightweight persistent domain object."
However, the author uses the term to refer to a non-persistent object. This
might be confusing to the non-expert reader. Therefore, I suggest changing
the terminology in future versions of the book.

Anonymous   
Printed Page 220
Middle of page

Add the word "annotation" after "@javax.ejb.ApplicationException".

Anonymous   
Printed Page 222
Middle of page

In the code sample, change "Package javax.ejb;" to "package javax.ejb;"

Anonymous   
Printed Page 222
Third paragraph

Change:
The EJB name defaults to the unqualified name of the bean class if you
initialize this attribute.

To:
The EJB name defaults to the unqualified name of the bean class if you
don't specify this attribute.

Anonymous   
Printed Page 224
xml file at bottom of page

The "env-entry" must be specified before "resource-ref".
This is sure, see http://java.sun.com/xml/ns/javaee/javaee_5.xsd in
<xsd:group name="jndiEnvironmentRefsGroup">

Also instead of
<remote>com.titan.processpayment.ProcessPaymentRemote<remote>
<local>com.titan.processpayment.ProcessPaymentLocal<local>
it must read
<business-local>com.titan.processpayment.ProcessPaymentLocal<business-local>
<business-remote>com.titan.processpayment.ProcessPaymentRemote<business-remote>
because the session bean has EJB 3.0 business interfaces.
See http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd in <xsd:complexType name="session-beanType">

The provided example 11_3 of the JBoss workbook is not deployable due to these errors.

Andreas Schreiber  Jun 24, 2010 
Printed Page 225
Top of page xml listing

In the xml listing on pages 224 and 225,
the "env-entry" should be specified before "resource-ref"
(jboss rejects it as listed).

Anonymous   
Printed Page 225
xml-file

There is an errata that says:
'{225} Top of page xml listing;
In the xml listing on pages 224 and 225,
the "env-entry" should be specified before "resource-ref"
(jboss rejects it as listed).'

But that is wrong.

Still, I cannot get JBoss to use this file in the correct manner.
Both the 'datasource' and the 'min' are not valid.

Anonymous   
Printed Page 225
2nd paragraph

After changing the xml file on pages 224 and 225 one must change following text as well:

The <remote> and <local> elements ...

should be

The <business-local> and <business-remote> elements identify the business interfaces of the bean, ... <env-entry> and <resource-ref> initialize the minCheckNumber and dataSource fields ...

Andreas Schreiber  Jun 24, 2010 
Printed Page 226
bottom code snippet

The camel notation for the veriable myself is spelled "mySelf" implying myself
is actually two words, which it is not.

Anonymous   
Printed Page 227
Middle of page

In the code sample, the last two lines should be changed from:

public EJBHome getEJBHome()
java.lang.IllegalStateException;
public EJBLocalHome getEJBLocalHome()
java.lang.IllegalStateException;

to

public EJBHome getEJBHome()
throws java.lang.IllegalStateException;
public EJBLocalHome getEJBLocalHome()
throws java.lang.IllegalStateException;

Anonymous   
Printed Page 228
1ste code snippet

In the withdraw method is the principal not initialized. The following line should be added

java.security.Principal pricipal = context.getCallerPrincipal();

Anonymous  Apr 20, 2010 
Printed Page 238
updateAddress() method


The updateAddress() method should check to see if (customer == null) and
throw an IncompleteConversationalState() exception if it is.

Anonymous  Mar 09, 2010 
Printed Page 251
Bottom, Code

ticketDescription should read as ticket.discription

Anonymous   
Printed Page 253
Bottom, Code

ticketDescription should read as ticket.discription

Anonymous   
Printed Page 254
Top of page

In the first code sample, change:

mapMsg.setInt("CustomerID", ticket.customerID.intValue());
mapMsg.setInt("CruiseID", ticket.cruiseID.intValue());
mapMsg.setInt("CabinID", ticket.cabinID.intValue());

to

mapMsg.setInt("CustomerID", ticket.customerID);
mapMsg.setInt("CruiseID", ticket.cruiseID);
mapMsg.setInt("CabinID", ticket.cabinID);

Anonymous   
Printed Page 254
Middle of page, objectMsg example

The lines

ObjectMsg.setObject(ticket);
producer.send(mapMsg);

should probably be

objectMsg.setObject(ticket);
producer.send(objectMsg);

Anonymous   
Printed Page 256
Top of page

Change:
env.put(Context.INITIAL_CONTEXT_FACTORY,
" org.jboss.security.jndi.JndiLoginInitialContextFactory");
To:
"org.jboss.security.jndi.JndiLoginInitialContextFactory");

Anonymous   
Printed Page 262
Top of page

Change "A message-driven bean is a complete enterprise bean, just like a
session or entity bean," to "A message-driven bean is a complete enterprise
bean, just like a session bean,". EJB3 has no concept of entity beans.

Anonymous   
Printed Page 262
Middle of page

Change "it creates a new Reservation EJB" to "it creates a new Reservation entity".

Anonymous   
Printed Page 263
code fragment

The @ActivationConfigProperty(propertyName="destination", propertyValue="queue/titan-
ReservationQueue") sub-annotation is missing.
This annotation is required.

Error repeats on page (268).

Anonymous   
Printed Page 264
Bottom of page

The listing showing EJBContext doesn't correspond to the listing on page 227.

Anonymous   
Printed Page 265
Middle of page

Change "javax.jta.UserTransaction" to "javax.transaction.UserTransaction".

Anonymous   
Printed Page 269
4th Paragraph

The statement
"all fields that are nontransient and nonserializable must be set to null
before the instance is passivated..."

should be
"all fields that are transient and nonserializable must be set to null before
the instance is passivated..."

Anonymous   
Printed Page 272
Top of page xml listing

There seem to be a lot of mistakes with the xml listing:

1. line 7: </resource-ref> should by </ejb-local-ref>

2. line 18: </env-entry> should be </persistence-context-ref>

2. lines 20,21:

<resource-ref-name> should be <res-ref-name>

<resource-type> should be <res-type>

<injection-target-name> should be connectionFactory instead of datasource


Anonymous   
Printed Page 277
2nd paragraph

"The @PreDestroy method should close any open resources before the stateless session bean is evicted from memory at the end of its life cycle."

should be:

"The @PreDestroy method should close any open resources before the MBD is evicted from memory at the end of its life cycle."

Anonymous  Sep 11, 2013 
Printed Page 277
3rd paragraph

"The MDB can handle many messages simultaneously, delegating the responsibility of handling each message to a different MDB instance."

should be

"The container can handle many messages simultaneously, delegating the responsibility of handling each message to a different MDB instance."

Torrii Murphy  Sep 11, 2013 
Printed Page 283
Middle of page; XML listing

<injection-target-class> should be com.titan.travelagent.TravelAgentBean and not
javax.jms.Topic

Anonymous   
Printed Page 284
first paragraph, line 2, top of page

on the 2nd line of first paragraph, where is written
<message-bean> element
should be
<message-driven> element

Rafael Fontoura  Sep 17, 2009 
Printed Page 287
Bottom, Code

implements ShipMaintenanceRemote implements javax.ejb.TimedObject
should read as
implements ShipMaintenanceRemote, javax.ejb.TimedObject

Anonymous   
Printed Page 287
Bottom of page

In the second code sample, replace the second occurrence of "implements" with a comma.

Anonymous   
Printed Page 287
Bottom of page

Replace "implement" with "implements"

Anonymous   
Printed Page 288
Middle of page

Change

ShipMaintenanceRemote maintenance =
(ShipMaintenanceRemote) jndiCntxt.lookup("ShipMaintenanceRemote ");
ShipMaintenanceRemote Calendar april2nd = Calendar.getInstance();

to

ShipMaintenanceRemote maintenance =
(ShipMaintenanceRemote) jndiCntxt.lookup("ShipMaintenanceRemote");
Calendar april2nd = Calendar.getInstance();

Anonymous   
Printed Page 288
4th line from bottom of the page

3rd parameter of scheduleMaintenance method,
Date dateOfTest
should be
Date dateOf

Anonymous   
Printed Page 288
Bottom of page

Remove non-relevant "@PersistenceContext(unitName="titanDB") entityManager;"

Anonymous   
Printed Page 288
Bottom of page

Change:
String item = ship + " is scheduling maintenance of " + description;
To:
String msg = ship + " is scheduling maintenance of " + description;

Anonymous   
Printed Page 288
bottom of page

wrong parameter names.
correct
"timerService.createTimer(dateOf, msg);"
to
"timerService.createTimer(dateOfTest, item);"

  Feb 21, 2009 
Printed Page 289
middle of page code listing

line:
@Resource(mappedName="MaintenanceTopic") topic;
should be
@Resource(mappedName="MaintenanceTopic") Topic topic;

Anonymous   
Printed Page 289
3rd parameter of scheduleMaintenance method

Date dateOfTest
should be
Date dateOf

Anonymous   
Printed Page 289
2nd code segment

Body of the "scheduleMaintenance(String ship, String description, Date dateOfTest)" method:
Correct
"timerService.createTimer(dateOf, item);"
to
"timerService.createTimer(dateOfTest, item);"

  Feb 21, 2009 
Printed Page 289
2nd code segment

2nd "@Resource" annotation without type specified.
Correct
"@Resource(mappedName="MaintenanceTopic") topic"
to
"@Resource(mappedName="MaintenanceTopic") Topic topic"

  Feb 21, 2009 
Printed Page 290
second createTimer explanation

The line:
long ninetyDays = 1000 * 60 * 60 * 24 * 90; // 90 days
Is incorrect. The int values are multiplied using integer math, which overflows before it is assigned to a long.
long ninetyDays = 1000L * 60 * 60 * 24 * 90; // 90 days
behaves properly.

Other long calculations on the next page happen to fit in an int.

Anonymous  Jun 06, 2011 
Printed Page 292
First paragraph

Replace the paragraph

After getting a reference to the TimerService, we get a Collection that
contains all of the Timers. Then we loop through the Collection, canceling
each timer whose MaintenanceItem is the desired ship.

with

After getting a reference to the TimerService, we get a Collection that
contains all of the Timers for the ShipMaintenanceBean EJB. Then we loop
through the Collection, canceling each timer.

Anonymous   
Printed Page 294
Middle of page

Replace the paragraph

"The scheduleMaintenance() method first obtains a Collection of all timers
defined for the ship."

to
"The scheduleMaintenance() method first obtains a Collection of all timers
defined for the ShipMaintenanceBean."

Anonymous   
Printed Page 295
Bottom of page

replace:
Timer.cancel();
with:
timer.cancel();

Anonymous   
Printed Page 295
Bottom, Code

javax.ejb.Timer timer = (javax.ejb.Timer) obj;
is missing in for loop

Anonymous   
Printed Page 296
The section "Retrieving other information from timers"

Contrary to the contents of the section, the Timer.getNextTimeout() method
always returns a java.util.Date representing the time at which the timer
expires next, and Timer.getTimeRemaining() returns the interval until expiration.
In other words, the text "If, however, the timer is an interval timer, the Date
returned is the time remaining until the next expiration." should be removed.

Anonymous   
Printed Page 296
Middle of page

The javax.ejb.Handle and javax.ejb.HomeHandle are not discussed in chapter 5.

Anonymous   
Printed Page 296
Bottom of page

Replace "javax.ejb.NoSuchObjectException" with "javax.ejb.NoSuchLocalObjectException".

Anonymous   
Printed Page 296
paragraph after code fragment

getTimer() method throws a javax.ejb.NoSuchObjectException.

should read

getTimer() method throws a javax.ejb.NoSuchObjectLocalException.

Andreas Schreiber  Jul 01, 2010 
Printed Page 296
TimerHandle interface

getTimer() also throws java.lang.IllegalStateException

Torrii Murphy  Sep 16, 2013 
Printed Page 298
3rd line from bottom

@PostCreate
should be
@PostConstruct

Anonymous   
Printed Page 298
code snippet

The implements is dropped in the class definition of StatelessTimerBean.

It should be

StatelessTimerBean implements javax.ejb.TimedObject

Anonymous  Apr 21, 2010 
Printed Page 298
last paragraph, 7th line

6th line of last paragraph, "an alternative is to have @PostCreate..." --> but this annotation doesn't exists. This refers to @PostConstruct?

Rafael Fontoura  Aug 28, 2012 
Printed Page 299
1st line

@PostCreate
should be
@PostConstruct

Anonymous   
Printed Page 299
last line of 2nd paragraph

using "@PreDestroy method..."
may be mora appropriate than
"ejbRemove() method..."

Anonymous   
Printed Page 299 & 301
Figures 13.1 and 13.2

Figures 13.1 and 13.2 are the same. Is it right?

Anonymous   
Printed Page 305
1st paragraph

"enterprise naming context" should be "environment naming context"
(as per Java EE 5 and EJB 3 specs).

This mistake is found throughout the book. However, the correct name is
given in a few instances.

Anonymous   
Printed Page 305
2nd paragraph (also on other pages / paragraphs)

@javax.annotation.EJB must be @javax.ejb.EJB

Anonymous   
Printed Page 306
2nd paragraph

The given xml code for the ejb-jar.xml is not valid. The <session> tag is not closed.

Anonymous   
Printed Page 308
paragraph after first code segment

"You do not append the 'java:comp/env' string to the name..."

you would never *append* it; it normally is prefixed to the lookup name

in this case you do not *prepend* the sub-string
(though not in most dictionaries, 'prepend' is a word all computer scientists know)

Anonymous   
Printed Page 309
last paragraph (xml listing)

The xml tag <ejb-local-ref> is opened but the xml tag </ejb-ref> is closed. This is
not valid xml.

Anonymous   
Printed Page 315
XML-based remote EJB references XML snippet

The opening <session> tag misses a closing </session> tag

Anonymous   
Printed Page 316
Last XML snippet on page folding to next page

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 317
Second XML snippet on page

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 317
Middle of page

Remove the word "remote" from the paragraph "The <ejb-local-ref> defines a
reference to remote EJBs."

Anonymous   
Printed Page 317
Middle of page

Change:
<ejb-ref-name>ejb/ProcessPaymentRemote</ejb-ref-name>
To:
<ejb-ref-name>ejb/ProcessPaymentLocal</ejb-ref-name>

Anonymous   
Printed Page 317
Bottom of page

Change

"The <ejb-ref-type> element can have one of two values, Session or Entity,
according to whether it is a session bean or an EJB 2.1 entity bean home interface."

to

"The <ejb-ref-type> element can have one of two values, Session or Entity, according
to whether it is a session bean or an EJB 2.1 entity bean local home interface."

Anonymous   
Printed Page 317
Bottom of page

Change

"..., then the <local-home> element must be provided with the fully qualified
name of the bean's home interface."

to

"..., then the <local-home> element must be provided with the fully qualified
name of the bean's local home interface."

Anonymous   
Printed Page 317
last

The <ejb-ref> element can be ...
should be
The <ejb-local-ref> element can be ...

Anonymous   
Printed Page 317
Second Paragraph



The <ejb-local-ref> element defines a reference to remote EJBs.
should be
The <ejb-local-ref> element defines a reference to local EJBs.

<ejb-ref-name>ejb/ProcessPaymentRemote</ejb-ref-name>

should be

<ejb-ref-name>ejb/ProcessPaymentLocal</ejb-ref-name>

Anonymous  Oct 15, 2010 
Printed Page 318
Middle of page

Change

ProcessPaymentLocal local = (ProcessPaymentRemote)
jndiContext.lookup("java:comp/env/ejb/ProcessPaymentLocal");

to

ProcessPaymentLocal local = (ProcessPaymentLocal)
jndiContext.lookup("java:comp/env/ejb/ProcessPaymentLocal");

Anonymous   
Printed Page 318
Last XML snippet on page

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 319
Middle of page

Replace "inventory.jar" with "inventory-ejb.jar".

Anonymous   
Printed Page 322
First XML snippet

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 325
Top of page

In the code sample, replace

EntityManager titan = (EntityManagerFactory)
jndiContext.lookup("java:comp/env/ejb/persistence/TitanDB");

with

EntityManager titan = (EntityManager)
jndiContext.lookup("java:comp/env/ejb/persistence/TitanDB");

Anonymous   
Printed Page 325
code under 1st paragraph

EntityManager titan = (EntityManagerFactoy) jndiContext.lookup("java:comp/env/persistence/TitanDB")

==>

EntityManager titan = (EntityManager) jndiContext.lookup("java:comp/env/persistence/TitanDB")

Torrii Murphy  Sep 24, 2013 
Printed Page 326
Middle of page

Add missing "</persistence-context-ref>" closing element to XML.

Anonymous   
Printed Page 329
Top of page

Change:
type=javax.sql.DataSource,
To:
type=javax.sql.DataSource.class,

Anonymous   
Printed Page 329
Bottom of page

Change:
type=javax.sql.DataSource,
To:
type=javax.sql.DataSource.class,

Anonymous   
Printed Page 331
First XML snippet

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 332
First XML snippet

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 333
All XML snippets

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 334
First XML snippet

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 335
First XML snippet

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 336
Middle of page

Change:
type=javax.jms.Topic,
To:
type=javax.jms.Topic.class,

Anonymous   
Printed Page 337
First XML snippet

Opening <session> tag misses a closing </session> tag.

Anonymous   
Printed Page 341
bottom of page InvocationContext listing

The JBOSS API InvocationContext seems to contain a "getBean" method and not a "getTarget".
I suppose in this case the book is right and it may be a JBOSS issue?

Anonymous   
Printed Page 347
audit() method in code

the method should return a value,
likely, it should end with:

return returnValue;

Anonymous   
Printed Page 349
Xml source code

<persistence-context-unit-name>auditdb</persistence-context-unit-name>
->
<persistence-context-unit-name>EnterpriseWideAuditDB</persistence-context-unit-name>

Anonymous  Apr 14, 2009 
Printed Page 350
last code snippet

the custom annotation (from the previous code block, and used in the following page) is named
'JndiIndected'.

the annotation used here is '@JndiInject',

text should read:
@JndiInjected("java:/TransactionManager")

Anonymous   
Printed Page 352
Top of page

Change "customer" to "custom".

Anonymous   
Printed Page 387
Top of page

utx.begin();
...
utx.commit();

should be

tran.begin();
...
tran.commit();

Anonymous  May 26, 2010 
Printed Page 388
Top of page

Change:
"javax.ejb.TransactionManagementType of Bean using the @javax.ejb.TransactionManager
annotation"

To:

"javax.ejb.TransactionManagementType of BEAN using the @javax.ejb.TransactionManagement
annotation".

Anonymous   
Printed Page 388
Middle of page

Change:
@TransactionManagement(TransactionManagerType.BEAN)
To:
@TransactionManagement(TransactionManagementType.BEAN)

Anonymous   
Printed Page 399
Bottom of page

The paragraph

"The IncompleteConversationalState exception is thrown if one of the arguments
passed into the bookPassage() is null."

should be changed to

"The IncompleteConversationalState exception is thrown if one of the (previously
set) properties customer, cruise or cabin is null." (See page 241 for definition of the
method).

Anonymous   
Printed Page 401
table 16-1

Hello,

Please find chapter 16, table 16-1, page 401, CMT with transaction type attributes: Reqired, Mandatory, Supports, System exception.
At Container's action there is only info that container rethrows javax.ejb.EJBTransactionRolledbackExeption.
According to Sun Micosystems JSR 220: Enterprise JaaBeans, ver 3.0, EJB Core Contracts and Requiremnts, table 14, page 360 and 361 the javax.transaction.TransactionRollbackException may be thrown to the client. Please find note D, pag 361.

Client may receives javax.ejb.EJBTransactionRolledbackException and
javax.transaction.TransactionRollbackException.

Kind Regards
Witold Koszulinski

Witold Koszulinski  Mar 11, 2009 
Printed Page 403
table 16-2, first row, System Exception, Container's action

Hello,

Accordng to Sun Mcrosystems spec. .., chapter 14 Excepion handling, 14.3.4 Exceptions from Message-Driven Bean Message Listener Methods,table 19, Bean method runs in the context of the tansaction that..., for System Exceptions row, Container's action column contains "Throw EJBException that wraps the original exception to resource adapter". This is omited in table 16-2 Exception summary formessage-deriven beans, page 403, first row, transaction attrbute = Required, System Exception, Container's action.

Please consider this in your errata.

Kind Regards
Witold Koszulinski

Witold Koszulinski  Mar 16, 2009 
Printed Page 406
Conversational Persistence Contexts

This works on Hibernates EntityManager, but not on TopLinks EntityManager. The question is
whether this is required by the specifications. (I couldn't find it)

Anonymous   
Printed Page 407
Top, Source

customer0 must be customer

Anonymous   
Printed Page 411
Bottom, Source

customer0 must be customer

Anonymous   
Printed Page 416
Bottom of page

In the code sample, replace:
@RolesAllowed("AUTOHORIZED_TRAVEL_AGENT")
with:
@RolesAllowed("AUTOHORIZED_MERCHANT")

Anonymous   
Printed Page 417
1st paragraph

The AUTHORIZED_MERCHANT role seems to be called AUTHORIZED_TRAVEL_AGENT in the
preceding text and (annotation-based) example. This causes annotation-related text
and example to be inconsistent with the XML-related text and example.

Anonymous   
Printed Page 418
Top of page

Change:
<method-name>byCheck</method-name>
To:
<method-name>byCash</method-name>

Anonymous   
Printed Page 420
Top of page

In the XML fragment, change

<method-params>double[]</method-params>

to

<method-params>
<method-param>double[]</method-param>
</method-params>

Anonymous   
Printed Page 422
Middle of page

Change:
<user-caller-identity/>
To:
<use-caller-identity/>

Anonymous   
Printed Page 422-423
Java code at bottom of p. 422; Java code at center of p. 423

Page 422:
javax.security.Principal getCallerPrincipal();
should be
java.security.Principal getCallerPrincipal();

Anonymous   
Printed Page 423

import javax.security.Principal;
should be
import java.security.Principal;

[exercise19_1] build.xml target name="run.client";
the system property "java.endorsed.dirs" has to be set into the run.client target of build.xml
for ex19_1 and other related examples like below, otherwise the client will run in a
unmarshalling error:

<target name="run.client" depends="clientjar">
<java classname="com.titan.clients.Client" fork="yes" dir=".">
<classpath refid="classpath"/>
<sysproperty key="java.endorsed.dirs" value="<jboss-home>libendorsed"/>
</java>
</target>

Anonymous   
Printed Page 455
Table 19-1

In the second column, change

Byte
Boolean
Short
Int
Long
float
Double

to

byte
boolean
short
int
long
float
double

It's explained in the following paragraph when it is the object wrapper classes that are used.

Anonymous   
Printed Page 456
Middle of page

Change:
The address attribute
To:
The location attribute

(or change to "The <soap:address> element").

Anonymous   
Printed Page 457 & 475
Listing

Seems that there is something wrong with the listing. Two EntityManagers with the
same variable name "em" are declared. One @PersistenceContext(unitname="titanDB")
private EntityManager em; and one @PersistenceContext EntityManager em;

Anonymous   
Printed Page 473
Code Sample (2nd ProcessorService constructor)

The constructor for the javax.xml.ws.Service does not take a String, but a URL
object.

Anonymous   
Printed Page 494
Figure 21-2

The figure is completely wrong if it's to illustrate the concepts introduced on p. 492-493.

The relation between Cruise and Reservation should have "0..*" multiplicity on the Reservation
side.
The relation between Cruise and Ship should have "0..*" multiplicity on the Cruise side.
The relation between Ship and Cabin should have "0..*" multiplicity on the Cabin side.
The relation between Cabin and Reservation should have "0..*" multiplicity on the Cabin side.

Anonymous   
Printed Page 499
Figure 21-4

The TravelAgent and Customer diagrams should have "<<Entity>>" added to them.
Remove the arrow between the TravelAgent and the Customer entities.

Anonymous   
Printed Page 502
Figure 21-5

Same corrections as in figure 21-4.

Anonymous   
Printed Page 503
Figure 21-6

Same arrow correction as in figure 21-4.

Anonymous   
Printed Page 503
Figure 21-7

The figure doesn't show the current customer as a method parameter. Instead it shows the
current customer as a property like it's a Stateful EJB. The figure should show a Stateless
EJB.

Anonymous   
Printed Page 508
2nd code example, 1st line

"LEFT FETCH JOIN" should be "LEFT JOIN FETCH"

Anonymous  Nov 07, 2008 
Printed Page 528
1st sentence

It's probably a recent change, but www.jboss.org has the downloads page that used to be available at www.jboss.com.

Anonymous  Mar 01, 2009 
Printed Page 536
"section next to trail icon

http://jakarta.apache.org/ant must be http://ant.apache.org

Anonymous   
Printed Page 541
persistence.xml code

<persistence-unit>
<name>titan</name>

should be:

<persistence-unit name="titan">

Anonymous   
Printed Page 542
Middle of page

In the JBoss example available for download, the PortableRemoteObject.narrow() has been
removed. This also applies to many other examples that are inconsistent.

Anonymous   
Printed Page 551
3rd paragraph

This exercise has "four" different...

It should only be "three"

Anonymous  Jan 26, 2013 
Printed Page 562
Bottom of page

Change:
<persistence-unit name="titan">
To:
<persistence-unit name="titan" transaction-type="RESOURCE_LOCAL">

Anonymous   
Printed Page 567
Bottom of page

Add the following method:

public void setTimeCreated(Date date) { timeCreated = date; }

Anonymous   
Printed Page 572
Middle of page - code listing Customer.java

public PK getPk()...
should probably read
public CustomerPK getPk()...

Anonymous   
Printed Page 597
middle of page - Excercise 8.2 heading

Heading should be "Single Table per [Concrete] Class" and not "Single Table per
Hierarchy"

Anonymous   
Printed Page 620
last paragraph

"FROM Cruise cr WHERE NOT EXISTS (SELECT res.amountPaid from cr.reservations res WHERE
res.amountPaid = 0)" gets "All cruises that have down payments" instead of "Cruises that have
reservations that don't have a down payment"

Anonymous   
Printed Page 659
3rd paragraph

The consumer application is very similar to the client application in Exercise 12.1.

should read

The consumer application is very similar to the client application class JmsClient_1 in Chapter 12.

Andreas Schreiber  Jul 20, 2010 
Printed Page 666
Section "Start Up JBoss"

Start Up JBoss must refer to Workbook 1 instead of Chapter 15

Anonymous   
Printed Page 684
This page and the following related to the client

I am trying to run Exercise 19. "Exposing a Stateless Bean" with JBoss 4.2.1 GA and JDK
1.6.0_01.
First, the generated WSDL location is not http://localhost:8080/titan/TravelAgentBean?wsdl
but
http://localhost:8080/TravelAgentBeanService/TravelAgentBean?wsdl

After I made this change in config files I have the following while running "ant run.client"
run.client:
[java] javax.naming.NamingException: Could not dereference object [Root exc
eption is org.jboss.ws.WSException: Cannot obtain java type mapping for: {http:/
/travelagent.titan.com/}createCabin]
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure
(NamingContext.java:1152)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:70
7)
[java] at org.jboss.naming.client.java.javaURLContextFactory$EncContext
Proxy.invoke(javaURLContextFactory.java:135)
[java] at $Proxy0.lookup(Unknown Source)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.titan.clients.Client.main(Client.java:19)
[java] Caused by: org.jboss.ws.WSException: Cannot obtain java type mapping
for: {http://travelagent.titan.com/}createCabin
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.pr
ocessDocElement(JAXRPCMetaDataBuilder.java:627)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.bu
ildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:886)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.se
tupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuil
der.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
[java] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuil
der.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
[java] at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImp
l.java:126)
[java] at org.jboss.ws.core.jaxrpc.client.ServiceObjectFactory.getObjec
tInstance(ServiceObjectFactory.java:141)
[java] at javax.naming.spi.NamingManager.getObjectInstance(NamingManage
r.java:304)
[java] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingCont
ext.java:1127)
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure
(NamingContext.java:1144)
[java] ... 5 more

Anonymous   
Printed Page 695
last parapgraph (not tip)

"$JBOSS_HOME/service/default/deploy" should be "$JBOSS_HOME/server/default/deploy"

Anonymous   
Printed Page 711
Index, under H

The index includes an entry for "<home> element, 315, 316", which is presumably left
from a previous edition. Doesn't seem to exist on those pages.

Also, on page 726, there's an entry for "setFactory2", which seems pretty useless as
it's just an example of how to inject a 2nd entity manager factory.

[exercise19_1] build.xml target name="run.client";
the system property "java.endorsed.dirs" has to be set into the run.client target of build.xml
for ex19_1 and other related examples like below, otherwise the client will run in a
unmarshalling error:

<target name="run.client" depends="clientjar">
<java classname="com.titan.clients.Client" fork="yes" dir=".">
<classpath refid="classpath"/>
<sysproperty key="java.endorsed.dirs" value="<jboss-home>libendorsed"/>
</java>
</target>

Anonymous   
Printed Page 714
index, line '@javax.ejb.PostCreate'

index, on page 714, mention annotation @javax.ejb.PostCreate, bu this annotation doesn't exists and neither is in page 29, referenced on index.

Rafael Fontoura  Aug 28, 2012