Message Persistence

JMS supports two modes of method delivery:

  • NON_PERSISTENT

  • PERSISTENT

Depending on the needs of your JMS application, NON_PERSISTENT message delivery offers the least amount of overhead and the best performance of the two modes. With the PERSISTENT mode of message delivery, the JMS server must guarantee that a message is delivered exactly once. The JMS server does this by taking extra care to ensure that the message is not lost after the MessageProducer sends it. The JMS server does so by using some type of persistent store to save the messages after they are sent.

With the NON_PERSISTENT delivery mode, a JMS provider does not take any extra precaution to ensure the message is saved or backed up. In case of a JMS server failure, ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.