Errata

Java Enterprise in a Nutshell

Errata for Java Enterprise in a Nutshell

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 37
paragraph 7

Statement stmt =
con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,

ResultSet.CONCUR_UPDATEABLE);

now reads:

Statement stmt =
con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,

ResultSet.CONCUR_UPDATABLE);

Anonymous    Sep 01, 2000
Printed
Page 38
"CONCUR_UPDATEABLE" now reads "CONCUR_UPDATABLE."

Anonymous    Sep 01, 2000
Printed
Page 53
1st bullet

The text now reads

"Every object ... has to ... implement an interface..."

Anonymous    Sep 01, 2000
Printed
Page 63
second command line:

now starts

% java -Djava.rmi.server.codebase=...

Anonymous    Sep 01, 2000
Printed
Page 105
second paragraph, first code example, and last paragraph

before "Getting Objects from Other Remote Objects" heading:

"list_initial_references()" was changed to "list_initial_services()". This
occurred twice in the prose and once in a code block.

Anonymous    Sep 01, 2000
Printed
Page 129
code near middle of page

now reads:

// Try loading from disk
try {
File r = new File("./data/counter.dat");
DataInputStream ds = new DataInputStream(new FileInputStream(r));
timesAccessed = ds.readInt();
}
catch (FileNotFoundException e){
// Handle error
}
catch (IOException e){
// This should be logged
}
finally{
ds.close();
}

should read:

// Try loading from the disk
try {
File r = new File("./data/counter.dat");
DataInputStream ds = new DataInputStream(new FileInputStream(r));
timesAccessed = ds.readInt();
ds.close();
}
catch (FileNotFoundException e) {
// Handle error
}
catch (IOException e) {
// This should be logged
}

In other words, strike the last three lines and insert "ds.close();" as the
fourth line under "try".

Anonymous   
Printed
Page 130
code

now reads:

public void destroy() {
// Write the integer to a file
File r = new File("./data/counter.dat");
try {
DataOutputStream dout = new DataOutputStream(new FileOutputStream(r));
dout.writeInt(timesAccessed);
}
catch (IOException e){
// this should be logged
}
finally {
dout.close();
}
}

should read:

public void destroy() {
// Write the Integer to a file
File r = new File("./data/counter.dat");
try {
DataOutputStream dout = new DataOutputStream(new FileOutputStream(r));
dout.writeInt(timesAccessed);
dout.close();
}
catch(IOException e) {
// This should be logged
}
}

That is, strike these three lines:

finally (
dout.close();
}

Anonymous   
Printed
Page 202
part of loadFromDB method

After

catch (SQLException e) {
throw new FinderException("Failed to load profile entries from DB: " +
e.toString());
}

the following line was added:

finally { try { s.close(); conn.close(); }

Anonymous    Sep 01, 2000
Printed
Page 207
2nd paragraph

The text did read "efbCreate()"; it now reads "ejbCreate()".

Anonymous    Sep 01, 2000
Printed
Page 445
Figure 27-1

ConnectionEventListener and RowSetListener should extend EventListener.
"Cloneable" now reads "EventListener."

Anonymous    Sep 01, 2000