Message types

 

JMS provides several message types, each of which embodies some knowledge of its content. To avoid referring to the provider specific class names for the message types, methods for creating messages are provided on a Session object.

For example, a text message can be created in the following manner:

System.out.println( "Creating a TextMessage" );
TextMessage outMessage = session.createTextMessage();
System.out.println("Adding Text");
outMessage.setText(outString);

Here are the message types we can use:

Details of these types are in Package com.ibm.jms.


uj25090_