Program guide > (deprecated) Partitioning facility > The partitioning facility > J2EE partitioning capabilities > HTTP partitioning

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

Extract partition names from HTTP requests

Partition names are extracted from HTTP requests using request expressions. A request expression consists of two strings: the match expression and the classifying formula.

Together, these strings provide a mechanism for classifying HTTP requests based on Java-supported regular expressions. The match expression determines how to 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 is matched.

To determine whether to partition an HTTP request, the on demand router (ODR) uses the pattern and matching classes of the java.util.regex package. If a match is found on any application-specified match expressions, the request has an associated partition. The ODR first concatenates the URL and query string to form a single string and invokes the patterns built from all application-specified match expressions. Upon a match, the classify formula determines how the partition name will be built. A special character, a dollar sign, indicates the portion of the match expression to use.

Consider a case where the match expression is:


and the classify formula is $2. The $2 takes the portion of the match corresponding to the portion:


as it is the second portion of the matching pattern. For example, if the URL consists of, $1 corresponds to user=, while $2 would correspond to fred.

Consider the match expression:


. Suppose a request arrived with a URL containing user=adolforodriguez. With a classify formula of $2, the resulting partition name would be adolfo. With a classify formula of mypartition$2, the request would have a partition name of mypartitionadolfo. Likewise, with a classify formula of $2$3, the resulting partition name would be adolforodriguez.

Also note that match expressions may overlap. For example, if you had two match expressions:

 (user=)(*)$ and (user=)(*)&

and we receive a URL with query string containing user=adolfo&Submit=Enter, both expressions would match. The former expression would extract adolfo&Submit=Enter with a $2 classify formula, while the latter would extract adolfo. Since only adolfo is a valid partition name, it would be chosen as the partition name. While it is typical that the "most specific" regular expression was the intended target, HTTP partitioning does make an attempt to favor a particular expression over the other. Instead, all expressions are applied until a valid partition name is found or none exist.

Parent topic:

HTTP partitioning

Related concepts

HTTP partitioning