Errata

Java Message Service

Errata for Java Message Service

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 5
Figure 1-3

The three JMS clients should be named "Application A", "Application B", "Application
C" and not all as "Application C

Anonymous   
Printed Page 28
5th paragraph

Here is the original quote:

"The Topic object encapsulates a vendoe specific name for identifying a physical topic in the
message server. The topic object has one method getName(), ..."

These are really 2 methods (in The topic object) AND it's getTopicName()

Anonymous   
Printed Page 35
Figure 3-1. Anatomy of a message

JMSCorrelationID header field is repeated

Anonymous   
Printed Page 37
Last paragraph

The method for setting delivery mode is named setDeliveryMode() and NOT
setJMSDeliveryMode() as dictated by the MessageProducer interface.

Anonymous   
Printed Page 40
5th paragraph

In the sentence "The value of a property can be a String, boolean, byte, double, int,
long or float", the type "short" should be added.

Anonymous   
Printed Page 42
3rd paragraph

the sample code won't compile. The corrected version is:

Enumeration propertyNames = message.getPropertyNames();

while (propertyNames.hasMoreElements()) {
String name = (String) propertyNames.nextElement();
Object value = message.getObjectProperty(name);
System.out.println("
name" + " = " + value);
}

Anonymous   
Printed Page 44
1st paragraph

The page is about message selectors and how the format of a selector is a subset of SQL-92. The
example given appears to contain invalid SQL:

session.createSubscriber(chatTopic, " username != 'William' ", false);

The != is incorrect syntax and should be <> as described in Appendix D.

Anonymous   
Printed Page 44
Line 9 from the bottom

"'username != 'William'" have an extra ' before the word "username".

Anonymous   
Printed Page 49
1st paragraph

Third sentence refers to "set<TYPE>() methods" when it should say "write<TYPE>()
methods".

Anonymous   
Printed Page 51
2nd paragraph

The sentence "...the pointer in the stream must be reset..." should be changed to
"...the pointer in the stream is reset..." since this is done by the JMS provider.
The application developer has no way of doing this. Also, this words the paragraph
like the last paragraph on page 53.

Anonymous   
Printed Page 53
Table 3-1

Table incorrectly shows that a char primitive can be read in as a String
from a StreamMessage

Anonymous   
Printed Page 57
Table 3-1 or paragraph underneath (discrepancy between chart and text)

The chart shows that a char primitive in a StreamMessage can be read as char or String. However, the paragraph below the chart states that a char cannot be read as a String: "However, most primitive values can be accessed as a String using the readString() method. The only exceptions to this rule are char values and byte arrays, which cannot be read as String values".

Stephenie Labovitz  Jun 09, 2010 
Printed Page 82
QRetailer constructor

The line
tFactory = (TopicConnectionFactory)jndi.lookup(broker);
should read
tFactory = (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");

The same reasoning applies to qFactory

Anonymous   
Printed Page 85
QRetailer constructor

The line
tFactory = (TopicConnectionFactory)jndi.lookup(broker);
should read
tFactory = (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");

The same applies to the line
qFactory = (QueueConnectionFactory)jndi.lookup(broker);
should read
qFactory = (QueueConnectionFactory)jndi.lookup("QueueConnectionFactory");

Anonymous   
Printed Page 87
middle of the page of sample code

I've compiled QWholesaler and have a casting error. When I look through the code,
it's obvious that the argument is not correct. Both of the jndi.lookup takes in
broker as argument but casts them to be TopicConnnectionFactory and
QueueConnectionFactory.

The sample code is as follows:
tFactory = (TopicConnectionFactory)jndi.lookup(broker);
qFactory = (QueueConnectionFactory)jndi.lookup(broker);
tConnect = tFactory.createTopicConnection(username, password);

Anonymous   
Printed Page 89
Table 5-1

In Table 5-1 the interfaces of the last two entries are inverted.
MessageConsumer is the general API for TopicSubscriber
MessageProducer is the general API for TopicPublisher

Dominik Gruntz  May 13, 2013 
Printed Page 94
code sample at bottom of page

The two lines

System.out.println("[" + message.getText() + "]");
if (message != null) {

should clearly be swapped. If the message is null, you would not want to call
message.getText().

Anonymous   
Printed Page 118
1st paragraph

The sentence "if the message is NOT redelivered AND it is NOT already in a rollback,"
should be changed to "if the message is NOT redelivered OR it is NOT already in a
rollback," because the negation of the expression A && B is NOT A || NOT B.

Anonymous   
Printed Page 121
The whole page

A lot of Java type casts are missing from the source code.

Anonymous   
Printed Page 130
5th paragraph, starts with "Although Java has..."

The word "links" at the end of the first sentence should be "leaks".

Anonymous   
Printed Page 151

"When messages are received from the wholesalers, RetailerMessageBean can process them quickly and
efficiently, providing a more scalable option then the JMS clients we developed in Chapter 4:"
should be "When messages are received from the wholesalers, RetailerMessageBean can process them
quickly and efficiently, providing a more scalable option than the JMS clients we developed in
Chapter 4:"

i.e. then --> than

Anonymous   
Printed Page 154
After end of last sentence of chapter 8

The words "message-driven beans" appear after the last sentence; they should
be removed.

Anonymous   
Printed Page 201
Last source code example on page

Same error as "[42] 3rd paragraph;"

Anonymous