Category Archives: JMS Interview Questions

Give an example of using the publish/subscribe model. | JMS Questions

JMS can be used to broadcast shutdown messages to clients connected to the Weblogic server on a module wise basis. If an application has six modules, each module behaves like a subscriber to a named topic on the server.

Posted in JMS Interview Questions | Leave a comment

What is the advantage of persistent message delivery compared to nonpersistent delivery? | JMS Questions

If the JMS server experiences a failure, for example, a power outage, any message that it is holding in primary storage potentially could be lost. With persistent storage, the JMS server logs every message to secondary storage. (The logging occurs … Continue reading

Posted in JMS Interview Questions | Leave a comment

Can two different JMS services talk to each other? For instance, if A and B are two different JMS providers, can Provider A send messages directly to Provider B? If not, then can a subscriber to Provider A act as a publisher to Provider B? | JMS Questions

The answers are no to the first question and yes to the second. The JMS specification does not require that one JMS provider be able to send messages directly to another provider. However, the specification does require that a JMS … Continue reading

Posted in JMS Interview Questions | Leave a comment

What is point-to-point messaging? | JMS Questions

With point-to-point message passing the sending application/client establishes a named message queue in the JMS broker/server and sends messages to this queue. The receiving client registers with the broker to receive messages posted to this queue. There is a one-to-one … Continue reading

Posted in JMS Interview Questions | Leave a comment

What is the difference between BytesMessage and StreamMessage? | JMS Questions

BytesMessage stores the primitive data types by converting them to their byte representation. Thus the message is one contiguous stream of bytes. While the StreamMessage maintains a boundary between the different data types stored because it also stores the type … Continue reading

Posted in JMS Interview Questions | Leave a comment

What is the use of MapMessage? | JMS Questions

A MapMessage carries name-value pair as it’s payload. Thus it’s payload is similar to the java.util.Properties object of Java. The values can be Java primitives or their wrappers.

Posted in JMS Interview Questions | Leave a comment

What is the use of ObjectMessage? | JMS Questions

ObjectMessage contains a Serializable java object as it’s payload. Thus it allows exchange of Java objects between applications. This in itself mandates that both the applications be Java applications. The consumer of the message must typecast the object received to … Continue reading

Posted in JMS Interview Questions | Leave a comment

What is the use of TextMessage? | JMS Questions

TextMessage contains instance of java.lang.String as it’s payload. Thus it is very useful for exchanging textual data. It can also be used for exchanging complex character data such as an XML document.

Posted in JMS Interview Questions | Leave a comment

What is the use of StreamMessage? | JMS Questions

StreamMessage carries a stream of Java primitive types as it’s payload. It contains some conveient methods for reading the data stored in the payload. However StreamMessage prevents reading a long value as short, something that is allwed in case of … Continue reading

Posted in JMS Interview Questions | Leave a comment

What is the use of BytesMessage? | JMS Questions

BytesMessage contains an array of primitive bytes in it’s payload. Thus it can be used for transfer of data between two applications in their native format which may not be compatible with other Message types. It is also useful where … Continue reading

Posted in JMS Interview Questions | Leave a comment