The atg.endeca.assembler.configuration.AssemblerApplicationConfiguration class configures the following:

This information complements the configuration stored the /atg/endeca/ApplicationConfiguration component, and enables communication with both the EAC applications managed by the Workbench server and any MDEX instances.

The Guided Search integration includes a component of the AssemblerApplicationConfiguration class, /atg/endeca/assembler/AssemblerApplicationConfiguration, that other components reference to retrieve the Workbench and MDEX connection details. The AssemblerApplicationConfiguration component also has an applicationConfiguration property that points to the ApplicationConfiguration component:

applicationConfiguration=/atg/endeca/ApplicationConfiguration

This section provides information on how the AssemblerApplicationConfiguration component calculates these details, while the sections after provide information on the components that use them. The following chapter, Retrieving Promoted Content, provides details on the different content retrieval methods and how to configure them.

Creating Application-specific Workbench Connections

Note: This section introduces the WorkbenchContentSource and DefaultWorkbenchContentSource components, in the context of what the AssemblerApplicationConfiguration component does with them. Additional information is provided about these component types in the following sections.

The /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource component holds details for connecting to a particular EAC application managed by the Workbench server (or, to be more specific, it functions as an alias for other components that calculate the connection details based on the environment and the current request). It is a requirement that a globally-scoped com.endeca.infront.content.source.WorkbenchContentSource object be instantiated for each EAC application in your environment before any content requests are made. Environments that have multiple EAC applications (for example, a separate application for each language or site), will need multiple WorkbenchContentSource components. The AssemblerApplicationConfiguration component is responsible for creating these components when necessary.

To create the application-specific WorkbenchContentSource components, the AssemblerApplicationConfiguration component resolves a prototype-scoped /atg/endeca/assembler/cartridge/manager/PrototypeWorkbenchContentSource component, which is of class atg.endeca.assembler.content.ExtendedWorkbenchContentSource, and inserts it into the Nucleus global scope under a new name that follows this pattern:

WorkbenchContentSource_EAC-application-key

Adding the EAC-application-key to the end of the WorkbenchContentSource component name uniquely identifies the WorkbenchContentSource component as the one to use for a given EAC application.

The PrototypeWorkbenchContentSource configuration includes a $basedOn property that references the /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource component, where arguments for the WorkbenchContentSource constructor are provided. The PrototypeWorkbenchContentSource component gets its settings from the DefaultWorkbenchContent component, with the exception of the EAC application name, which it gets from the AssemblerApplicationConfiguration component’s currentInitializingWorkbenchContentSourceApplicationName property.

Determining Which MDEX to Use

The AssemblerApplicationConfiguration component determines which host name and port to use to connect to the correct MDEX engine for any given request. The /atg/endeca/assembler/cartridge/manager/MdexResource component, which represents the connection to a single MDEX, refers to the AssemblerApplicationConfiguration component when creating a connection for a specific request.

The MDEX host and port values are stored in the AssemblerApplicationConfiguration.currentMdexHostname and AssemblerApplicationConfiguration.currentMdexPort properties, respectively. The AssemblerApplicationConfiguration component includes configuration settings that specify how the currentMdexHost and currentMdex port properties are determined.

To direct a request to the correct MDEX, you configure the applicationKeyToMdexHostAndPort property on the /atg/endeca/ApplicationConfiguration component. The AssemblerApplicationConfiguration component also has an applicationKeyToMdexHostAndPort property that is set automatically to the value of the ApplicationConfiguration.applicationKeyToMdexHostAndPort property.

The applicationKeyToMdexHostAndPort property is a map where the keys identify each EAC application and the values specify the host names and port numbers for the MDEX engines associated with each application.

If you have a single EAC application, the key is default, and you map it to the MDEX as follows:

applicationKeyToMdexHostAndPort=\
   default=host:port

For example:

applicationKeyToMdexHostAndPort=\
   default=myHost.example.com:15300

Note that if the applicationKeyToMdexHostAndPort property is not set, the hostname and port are obtained from the values of the AssemblerApplicationConfiguration.defaultMdexHostName and AssemblerApplicationConfiguration.defaultMdexPort properties . These properties default to localhost and 15000 respectively, but you can explicitly set them to other values. However, if you set applicationKeyToMdexHostAndPort, it overrides these properties.

If you have multiple applications (for example, a separate application for each language), the keys depend on the routing strategy you are using:

To determine which MDEX to direct a request to, the component specified by the AssemblerApplicationConfiguration.routingObjectAdapter property examines the request and related objects to find locale and site information. This component, which is of a class that implements the RequestRoutingObjectAdapter interface, must match the routing strategy you are using. For example, if your routing strategy is SiteApplicationRoutingStrategy, the routingObjectAdapter property should be set to SiteRequestRoutingObjectAdapter.

Based on the information returned by the RequestRoutingObjectAdapter component, the AssemblerApplicationConfiguration component retrieves the key in one of two ways:

The key is then used to retrieve the host and port values from the applicationKeyToMdexHostAndPort map.

For example, if your environment has two EAC applications to support two languages, English and German, and your routing strategy is SingleApplicationRoutingStrategy, the applicationKeyToMdexHostAndPort setting might be:

applicationKeyToMdexHostAndPort=\
     en=localhost:15000,\
     de=localhost:15100

For more information about the ApplicationConfiguration component, see the Configuring the ApplicationConfiguration Component section of the Introduction. For more information about routing strategies, see the Routingchapter.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices