Compared with JMS bridges, the practical implementation of SAF is a little bit different.
The SAF-architecture looks like this:
First, we configure the target domain.
This is quite straight forward. Define a JMS server, a JMS module with a connection factory and a queue.
The source configuration is different.
- You need a JMS server as well.
- You'll need to create a "Store-And-Forward Agent" connected with a persistent store.
- A "Connection Factory" must be configured.
- The queue doesn't have to configured in the system module directly.
- A "SAF Remote Context" needs to be created; there we will define the t3 connection url.
- As last component, a "SAF Imported Destination" must be configured. In that component, we'll make a queue that points to the target queue.
SAF Agent:
The components of the system module:
The SAF Remote Context:
The SAF Imported Destination:
The SAF Queue within the imported destination:
In a small web application, we send messages to the source queue:
And the output on our target queue looks like this:
[oracle@wls12c2 jms]$ java SAFQueueTargetReceive t3://wls12c2:8011
JMS Ready To Receive Messages (To quit, send a "quit" message).
Text Message Received: this is a test message 0
Text Message Received: this is a test message 1
Text Message Received: this is a test message 2
Text Message Received: this is a test message 3
Text Message Received: this is a test message 4
Text Message Received: this is a test message 5
Text Message Received: this is a test message 6
Text Message Received: this is a test message 7
Text Message Received: this is a test message 8
Text Message Received: this is a test message 9
Conclusion: our SAF configuration works like a charm!
No comments:
Post a Comment