Program guide > (deprecated) Partitioning facility > Partitioning facility programming > HTTP partitions


Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.


Specify HTTP partitions in partitions.xml

The HTTP partitioning function requires the specification of two configuration lists: expressions and partitions. The expression list consists of all regular expressions that will be used to extract valid partition names from incoming HTTP requests. The partitions list contains all valid partition names identifying all partitions that should be managed by the high availability (HA) manager and activated in back-end target servers.

There are two ways for supplying this information:

A sample partitions.xml file is provided here:

<?xml version="1.0" encoding="UTF-8"?>

<wpfhttp:Partitions xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 
xmlns:wpfhttp="http://www.ibm.com/websphere/application server/schemas/6.0/
wpfhttp.xmi" xmi:id="http.wpf.sample">

<ExpressionList xmi:id="ExpressionList_1095302397199">

<RequestExpression xmi:id="RequestExpression_1095302397199" 
MatchExpression="(user=)(.*)$" ClassifyFormula="$2"/>

</ExpressionList>

<PartitionList xmi:id="PartitionList_1095302397199">

<PartitionEntry xmi:id="PartitionEntry_1095302397199" Name="adolfo"/>

<PartitionEntry xmi:id="PartitionEntry_1095302397200" Name="isabelle"/>

</PartitionList>

</wpfhttp:Partitions>
<>

This partitions file identifies matching regular expressions (in the ExpressionList section) with two strings: the match expression and the classify formula. The match expression determines how we match on a portion of the URL and query string. The classify formula indicates the portion of the URL and query string that specifies the partition once the expression has been matched.

Note that XML has a special set of characters that cannot be used in normal XML strings. Most notably among them is the ampersand character, &, which is the character used to separate variables in the query string. As a result, a match expression containing the ampersand character will result in generated XML such as this:

<RequestExpression xmi:id="RequestExpression_1095302397199" MatchExpression=
"(user=)(.*)&" ClassifyFormula="$2"/>

Though not recommended, one may modify a partitions.xml manually. Care must be taken to ensure that these special set of characters is not used when editing a partitions.xml file. For more information on these characters, please refer to the XML specification.

To circumvent a manual edit, an Eclipse (WebSphere Studio Application Developer) plug-in will be made available through web download at the http://www.ibm.com/developerworks Web site. The second portion of this file (the PartitionList) is much more straightforward as it simply lists all valid partition names. This list is communicated with the partitioning facility during application startup to inform the partitioning facility of the partitions it should activate.


Parent topic:

HTTP partitions


Related concepts

HTTP partitions