Each form handler has a searchContext property that points to a component of class atg.search.formhandlers.SearchContext. This component, which should be session-scoped, maintains information about the connection to Routing. By default, the searchContext property of each form handler component is set to /atg/search/formhandlers/SearchContext.

The SearchContext component’s primaryConnection property specifies the location of the DAF.Search.Routing module that the search client is accessing. Accessing this module on the same ATG instance as the search client is called local Routing; accessing it on a different ATG instance called remote Routing. If you are using local Routing, primaryConnection should be set to local (the default). If you are using remote Routing, set primaryConnection to:


port is the RMI port used by ATG (typically 8860). For example:


For remote Routing, you can use the SearchContext component’s failoverConnections property to specify an array of additional Routing instances to use if the primary instance fails. For example:


The maxAttemptsBeforeFailover property specifies the maximum number of times to attempt to access a specific Routing instance before failover. The default value is 2.

The SearchContext component also has properties that control the firing of JMS messages when results are returned from a query. See JMS Event Handling for information.

SearchSession Object

The SearchContext component has a searchSession property that is set automatically to an object of class atg.search.client.SearchSession. This object is used to store information that needs to persist between search requests. For example, for paging of results, the SearchSession can keep track of the current page so that a subsequent request can determine what the next page is. The SearchSession can even store the entire previous request, which is useful for contexts (such as faceted search and some paging options) where you might want to reissue a request with only minor changes.

loading table of contents...