Provide most of the functionality of common messaging systems. Many messaging system vendors have implemented JMS for their products, allowing Java access to the functionality of their systems. JMS Clients Can Use Java Facilities JMS clients, since they are based on Java, can make use of existing Java APIs such as JDBC TM for database access, the JavaBeans TM components model, JNDI for naming services, JTA for client transaction control, or any of the J2SE TM and J2EE TM APIs for enterprise application services. We now look at the details of building a messaging system client using JMS, starting with messages. Although the definition of a message varies greatly between messaging systems, JMS provides a unified means of describing and accessing messages.
Body Holds the content of the message.
Other formats are supported as well. TextMessages A TextMessage wraps a simple String object. This is useful in situations where only strings are being passed. It is expected that many messaging systems will be based on XML, and TextMessages are a natural container for these. A TextMessage created in this way is ready to be published to a messaging system.