Oracle ATG Web Commerce has several components for creating a connection to an Endeca Workbench application. The Workbench connection components can vary depending on whether your environment has a single Workbench application or multiple applications (for example, to support multiple languages). Here is a brief overview of the process:

The remaining sections provide more details on the individual Workbench-related components.

WorkbenchContentSource

The /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource component represents the current application’s connection to the Workbench. The NucleusAssembler class uses this component to connect to the correct Workbench application.

Out of the box, the WorkbenchContentSource component uses a $basedOn property set to the /atg/endeca/assembler/cartridge/manager/PerApplicationWorkbenchContentSourceResolver, which is a request-scoped component that determines which Workbench application to connect to, based on the current request. This default configuration is primarily intended to support environments that have multiple applications, although it works for single-application environments as well.

The WorkbenchContentSource properties file also includes some configuration, which has been commented out, that is more efficient for environments that always have a single Endeca application:

# $class=atg.nucleus.GenericReference
# $scope=global
# componentPath=DefaultWorkbenchContentSource

This configuration creates a globally-scoped WorkbenchContentSource component that gets its connection details from the /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource component. This approach is more efficient for a single-application environment because it avoids having to resolve the WorkbenchContentSource for every request. If you have a single-application environment, you can use this configuration instead.

The following sections provide some additional details on the DefaultWorkbenchContentSource and PerApplicationWorkbenchContentSource components that provide the connection details stored in a WorkbenchContentSource component.

DefaultWorkbenchContentSource

The /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource component, of class atg.endeca.assembler.content.ExtendedWorkbenchContentSource, is a globally-scoped component that includes properties for connecting to a default Workbench application. Out of the box, this property is included in the initialServices property of the /initial component, to ensure that it is created on start up.

initialServices+=\
   /atg/endeca/assembler/AssemblerPipelineServlet,\
   /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource

In a single application environment, the DefaultWorkbenchContentSource component provides connection details to the single globally-scoped Workbench application that should be used for all requests. In a multi-application environment, this component provides connection details to a default Workbench application in case that the PerApplicationWorkbenchContentSourceResolver cannot resolve an Endeca application-specific WorkbenchContentSource.

The DefaultWorkbenchContentSource component has a set of properties that represent the constructor arguments that are used to create the WorkbenchContentSource. The DefaultWorkbenchContentSource component gets the values for these properties from the ApplicationConfiguration and AssemblerApplicationConfiguration components. It is the responsibility of these other two components to calculate the correct Endeca application and Workbench connection to use. The DefaultWorkbenchContentSource properties include:

PerApplicationWorkbenchContentSourceResolver

In an environment that has multiple Workbench applications, it is the /atg/endeca/assembler/cartridge/manager/PerApplicationWorkbenchContentSourceResolver component’s responsibility to determine the correct globally-scoped, Endeca application-specific WorkbenchContentSource component to use for the current request. This component also defines a default WorkbenchContentSource component to use if an Endeca application-specific version cannot be found. PerApplicationWorkbenchContentSourceResolver is of class atg.endeca.assembler.configuration.PerEndecaApplicationGenericReference, which extends the atg.nucleus.GenericReference class to calculate the correct component to reference based on the Endeca application key of the current request.

Note that PerApplicationWorkbenchContentSourceResolver is request-scoped. This means that the globally-scoped WorkbenchContentSource component that it resolves and references gets inserted into the request scope as an alias. This effectively allows the application to resolve the WorkbenchContentSource component on a per-request basis.

To perform its tasks, the PerApplicationWorkbenchContentSourceResolver component has the following properties:

Manually Adding Application-specific WorkbenchContentSource Components

It is an Endeca requirement that the WorkbenchContentSource component used to communicate with any given Workbench application be globally scoped and started up front, before any requests are made. To accommodate this requirement, the ApplicationAssemblerConfiguration component automatically creates Endeca application-specific WorkbenchContentSource components on application start up.

If the automatically-created WorkbenchContentSource components are not sufficient for your needs, you can manually create .properties files for other Endeca application-specific WorkbenchContentSource components, for example:

$basedOn=DefaultWorkbenchContentSource

# Arg1 - Workbench app name
$constructor.param[1].value=Endeca-application-name

# Arg3 - Workbench host
$constructor.param[3].value=Workbench-host-name

# Arg 4 - Workbench port
$constructor.param[4].value=Workbench-host-port

After creating the Endeca application-specific WorkbenchContentSource components, you must add them to the intialServices property of the /initial component so that they are started on application start-up, for example:

initialServices+=\
   /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource_application-key

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