Java EE 7 Developer Handbook - Errata
Java EE 7 Developer Handbook - Errata
The latest update on the code in this book can be found in the author's GitHub page at
https://github.com/peterpilgrim/javaee7-developer-handbook
The following line in the last paragraph of the Basic injection section:
For now, we will assume that the lifetime of the bean typed live for the duration of the application.
should be
For now, we will assume that these bean types exist for the lifetime of the application's deployment.
should be
With CDI, we use a special custom annotation for this.
It should be
The file, which is specific only to the GlassFish application server, and is
named src/test/resources-glassfish-embedded/logging.properties is
as follows:
It should be
JSON-P 1.0: This is a brand new framework for the Java application
read-and-write JavaScript Object Notation (JSON) documents
It should be
The Java Persistence API (JPA), JSR 338, Version 2.1 is the specification that mandates how persistence
can be applied...
On page 209
The second code example is identical to the one on page 208.
Page: 215
The correct code ispublic boolean addPhone( Phone phone) {
if ( ! phones.contains( phone) ) {
Employee oldEmployee = phone.getEmployee();
if ( oldEmployee != null ) {
removePhone( phone )
}
phones.add( phone );
return true;
}
else { return false; }
}