The atg.endeca.assembler.configuration.AssemblerApplicationConfiguration class calculates and stores the following:

This information complements the information contained in the /atg/endeca/ApplicationConfiguration component and it 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. 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, to support multiple languages, 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.

Calculating 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 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 calculated.

Typically, if your application uses a single MDEX, you set the defaultMdexHostName and defaultMdexPort properties of the AssemblerApplicationConfiguration component to the host and port for that MDEX, for example:

defaultMdexHostName=localhost
defaultMdexPort=15000

The AssemblerApplicationConfiguration then uses the defaultMdexHostName and defaultMdexPort settings to set the currentMdexHostName and currentMdexPort properties.

If your application uses multiple MDEX engines, for example, one MDEX for each language, you must configure the applicationKeyToMdexHostAndPort property. This property contains 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. For example, if your environment has two EAC applications to support two languages, English and German, the applicationKeyToMdexHostAndPort would be set as follows:

applicationKeyToMdexHostAndPort=\
     en=
host-for-English-MDEX:port-for-English-MDEX\
     de=
host-for-German-MDEX:port-for-German-MDEX

To calculate which MDEX host and port to use, the AssemblerApplicationConfiguration component retrieves the EAC application key for the current request from the ApplicationConfiguration component, and then uses that key to retrieve the correct host and port values from the applicationKeyToMdexHostAndPort map. To enable the call to the ApplicationConfiguration component, the AssemblerApplicationConfiguration component includes the following required property:

applicationConfiguration=../ApplicationConfiguration

Note: For more details, on the ApplicationConfiguration component, see the Configuring the ApplicationConfiguration Component section.

On a final note, the /atg/endeca/assembler/AssemblerApplicationConfiguration .defaultMdexHostName and /atg/endeca/assembler/AssemblerApplicationConfiguration .defaultMdexPort properties are commented out in the DAF.Endeca.Assembler module out of the box. If you use CIM to configure your application, it does not modify these settings, so you will need to configure them manually in your localconfig environment, using the guidance provided in this section.


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