Ravish Mody

Yesterday I was chatting with one of my ex-colleague Shruti and she requested me to write a post on Store-and-Forward (SAF) as the she was having some issue in configuring it and as usual the edocs are pretty confusing to do anything. So I took out sometime and wrote this post  which would help others too. For demo check out this post JMS Demo using Weblogic Store-and-Forward (SAF)

First of all lets understand what is Store-and-Forward (SAF) and then will look into how it works, how to configure it with its advantages.

What is Store-and-Forward (SAF)

Store-and-Forward (SAF) is a service which enables weblogic server to deliver messages reliably that is weblogic server make sure that the messages are been delivered between applications that are distributed across weblogic server instances.

How does Store-and-Forward (SAF) works

As the name suggests the messages gets stored at the Sender side in the persistence store and then are forwarded to the Receiver side using the SAF Agent.

Advantages of Store-and-Forward (SAF)

The main reason or the biggest advantage of Store-and-Forward (SAF) for which weblogic server had implemented was that they wanted the messages to be delivered to the receiver even when the receiver was down when the messages where sent.

Steps to Configure Store-and-Forward (SAF)

1.  You have to follow steps from Step-1 to Step-5 from the post Basic JMS Demo using WebLogic Queue for Domain-2 running on port 8001 and again same steps BUT this time only follow steps from Step-1 to Step-4 on Domain-1 running on port 7001.

2.  Now after doing the above step creating a SAF Agent


Creating SAF Agent


Targeting SAF Agent

3.  Create Sub Deployment for SAF in the same Module


Creating SAF Sub Deployment


Targeting SAF Sub Deployment

4. Creating Remote SAF Context in the same Module


Creating Remote SAF Context


Configuring Remote SAF Context

5.  Creating SAF Imported Destination in the same Module


Creating SAF Imported Destination


Configuring SAF Imported Destination


Targeting SAF Imported Destination


Advanced Targeting SAF Imported Destination to the SAF Sub-Deployment

6.  Creating SAF Imported Destination Queue


Selecting Created SAF Imported Destination


Creating SAF Imported Destination Queue


Configuring "Remote" JNDI SAF Imported Destination Queue


Selecting Created SAF Imported Destination Queue


Configuring "Local" JNDI for SAF Imported Destination Queue

Following are the XML configuration which would look like from the SAF point of view

In config.xml file


In mysystemmodule-jms.xml file

<saf-imported-destinations name="SAFImportedDestinations">
<saf-queue name="MySAFQueue">
<saf-error-handling xsi:nil="true"></saf-error-handling>
<saf-remote-context name="MyRemoteSAFContext">

Yup its little bit confusing but that’s it, your configuration for Store-and-Forward (SAF) has been finished. Hope this would help.


Ravish Mody

If you enjoyed this post, please considerleaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.