Copying the Options' Properties into RM Messages

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By Chamikara Jayalath
  • 11 Mar, 2007

When reliable message exchanges take place with Apache Sandesha2/Java, you will observe that various RM control messages are exchanged while the application message exchange is taking place. They include RM sequence management messages and RM acknowledgment messages.

Sometimes you may want a certain property in the Options object to be available in all the messages that are created and sent through the handler chain. For example, you may be setting a certain security policy for configuring Apache Rampart/Java. However, you observe that this policy is available only for the application messages, and that the RM control messages are sent without adhering to this security policy.

The remedy for this is to add the following parameter to the Sandesha2 module.XML.

<parameter name="propertiesToCopyFromReferenceMessage">key1,key2</parameter>
<parameter name="propertiesToCopyFromReferenceRequestMessage">key1,key2</parameter>

When you set the first parameter, all the RM messages of the client side will contain the properties you set to the Options object with the keys Key1 and Key2.

The second parameter is for the server side. Here the properties are copied from the request message to the RM messages of the out path.

In addition to the above, if you also want to copy the property 'abc' to the RM messages with the key 'xyz', you can set the above parameter as follows.

<parameter name="propertiesToCopyFromReferenceMessage">key1,key2,abc:xyz</parameter>

You can use this to set two different security policies for Application messages and RM control messages. You may need to sign and encrypt the Application messages but the RM control messages may only need to be signed.

Applies To:

Apache Sandesha2/Java, 1.1 and above.