10.02.2013 Views

esb_deploy - Progress Sonic ESB Deployment Guide 8.5 - Product ...

esb_deploy - Progress Sonic ESB Deployment Guide 8.5 - Product ...

esb_deploy - Progress Sonic ESB Deployment Guide 8.5 - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3: Mapping <strong>ESB</strong> Artifacts to Target Domains<br />

Using StringReplace and PropertyReplace Content Change Rules<br />

The content change rules, StringReplaceMaps and PropertyReplaceMaps, are closely<br />

related. The following sections contain information about using both types.<br />

Rule Processing<br />

When you apply a map, its content change rules are processed as follows:<br />

1. PropertyReplaceMaps are processed before StringReplaceMaps and are checked for<br />

named rules and generic rules.<br />

■ If both a named rule and a generic rule exist, and both affect the same property,<br />

the named rule takes precedence over the generic rule. Best practice is to make<br />

sure that a named property file contains only one instance of a named property,<br />

because multiple instances may cause unpredictable results.<br />

■ If multiple generic rules exist, they are processed in a top-down manner. If<br />

multiple generic rules affect the same property, the last rule found in the map (that<br />

is, the rule nearest to the bottom) takes precedence. Best practice is to have only<br />

one generic rule.<br />

■ Generic rules extend to all properties files in the XAR and any component<br />

packages. Best practice is to use only named properties files, unless you are<br />

comfortable with changing properties globally.<br />

2. After all PropertyReplaceMaps are completed, StringReplaceMaps are processed.<br />

■ StringReplaceMaps are checked to determine the order of rules (specified with the<br />

order attribute) and then processed in the specified order. Unordered rules are<br />

processed after ordered rules.<br />

■ You can add an artifactName property to a StringReplaceMap to constrain its<br />

scope to the named file. But the rule is still processed in the stated order.<br />

■ If there are multiple unordered StringReplaceMaps, they are processed in a topdown<br />

manner. Best practice is to use only ordered rules, because multiple rules<br />

with no specific order may cause indeterminate results.<br />

Creating Properties Files<br />

It is good practice to make additional copies of properties files in preparation for tailoring.<br />

For example, copying <strong>ESB</strong>ToREST.properties to <strong>ESB</strong>ToREST_test.properties and<br />

<strong>ESB</strong>ToREST_production.properties in <strong>Sonic</strong>FS makes tailoring a bit easier. The alternative<br />

would be to extract the properties file from the XAR, make a named copy, and then add<br />

them back in to the XAR.<br />

72 <strong>Progress</strong> <strong>Sonic</strong> <strong>ESB</strong> <strong>Deployment</strong> <strong>Guide</strong> <strong>8.5</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!