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

  1. On startup, the /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource component is instantiated. This component contains details for connecting to a default EAC application.

  2. If the environment has more than one EAC application, the AssemblerApplicationConfiguration component creates globally-scoped, WorkbenchContentSource_EAC-application-key components for each EAC application. Each component has a suffix that identifies which EAC application the component is for, for example, WorkbenchContentSource_en and WorkbenchContentSource_de. These application-specific components have a set of properties that are comparable to those in the DefaultWorkbenchContentSource, but contain values that are specific to each individual EAC application.

  3. The NucleusAssembler resolves the /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource component. This component in turn resolves either the /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource component or the /atg/endeca/assembler/cartridge/manager/PerApplicationWorkbenchContentSourceResolver as the WorkbenchContentSource to use for the current request.

  4. If the DefaultWorkbenchContentSource is resolved, the connection details defined by this component are used when retrieving content.

  5. If the PerApplicationWorkbenchContentSourceResolver is resolved, the component relies on the AssemblerApplicationConfiguration to determine what the current EAC application is and then it references the correct EAC application-specific WorkbenchContentSource that the AssemblerApplicationConfiguration component has already created in step 2.

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

WorkbenchContentSource

The /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource component represents the connection to a particular EAC application managed by the Workbench server. The NucleusAssembler class uses this component to connect to an EAC application and request content, using the content retrieval method specified.

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 EAC application-specific WorkbenchContentSource to use, based on the current request. This default configuration is primarily intended to support environments that have multiple EAC 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 have a single EAC 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 EAC application environment because it avoids having to resolve the WorkbenchContentSource for every request. If you have a single EAC 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, is a globally-scoped component of class atg.endeca.assembler.content.ExtendedWorkbenchContentSource. In a single EAC application environment, the DefaultWorkbenchContentSource component provides connection details for the single EAC application managed by the Workbench server that should be used for all requests. In a multi-application environment, this component provides connection details to a default EAC application when the PerApplicationWorkbenchContentSourceResolver cannot resolve an application-specific WorkbenchContentSource.

Out of the box, this component 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

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

PerApplicationWorkbenchContentSourceResolver

In an environment that has multiple EAC applications, it is the /atg/endeca/assembler/cartridge/manager/PerApplicationWorkbenchContentSourceResolver component’s responsibility to determine the correct globally-scoped, application-specific WorkbenchContentSource component to use for the current request. This component also defines a default WorkbenchContentSource component to use if an 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 EAC 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 a requirement that the WorkbenchContentSource component used to communicate with any given EAC application be globally scoped and started up front, before any requests are made. To accommodate this requirement, the ApplicationAssemblerConfiguration component automatically creates corresponding WorkbenchContentSource components for each EAC application on start up.

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

$basedOn=DefaultWorkbenchContentSource

# EAC application name
appName=EAC-application-name

# Workbench host
host=Workbench-host-name

# Workbench content retrieval port, defaults to 8007
serverPort=8007

Note that the serverPort property refers to the port used for content retrieval (8007, by default), as opposed to the port used to connect to the Workbench (8006, by default).

After creating the EAC 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_EAC-application-key

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