close

Filter

loading table of contents...

Connector for SAP Commerce Cloud Manual / Version 2404

Table Of Contents

3.3 Configuring the CoreMedia Fragment Connector

The CoreMedia Fragment Connector is the central component in the commerce-led integration scenario (see Chapter 5, Commerce-led Integration Scenario).

The CoreMedia Fragment Connector is the component that connects with CoreMedia CAE to load CoreMedia content fragments into store pages. Configure the connector in the configuration file $HYBRIS_HOME/bin/custom/cmlivecontext/project.properties, as described below:

Configure at least the parameter com.coremedia.fragmentConnector.liveCaeHost with the host URL of your Content Application Engine. If you use a single SAP Hybris Commerce Server that should be able to connect to both, preview and production CAE, you also need to set com.coremedia.fragmentConnector.previewCaeHost with the host URL of the preview CAE. In case you have a dedicated staging server with separate production system, you only need to configure one CAE host, for each.

Find the meaning of all parameters in the configuration file in Table 3.1, “CoreMedia Connector Properties”.

com.coremedia.fragmentConnector.liveCaeHost
Description The liveCaeHost identifies the Live CAE, to be precise, the Varnish, Apache or any other proxy in front of the Live CAE. Each request made by the fragment connector will be prefixed with the urlPrefix.
Default http://preview-apparel.192.168.252.100.xip.io/
com.coremedia.fragmentConnector.previewCaeHost
Description The previewCaeHost identifies the Preview CAE, to be precise, the Varnish, Apache or any other proxy in front of the Preview CAE. Each request made by the fragment connector will be prefixed with the urlPrefix. The previewCaeHost is only required if you want a single Commerce instance being able to access the preview CAE in case of Commerce preview against the stage catalog and the live CAE in all other cases. Additionally, the preview mode can be invoked through an HTTP header. If you have a dedicated Commerce instances for staging and separate production Commerce systems, you do not need to set this property. If this parameter is not set, the parameter liveCaeHost will be used instead.
Default http://preview-apparel.192.168.252.100.xip.io/
com.coremedia.fragmentConnector.urlPrefix
Description This prefix identifies the web application, the servlet context and the fragment handler to handle fragment requests. The default request mapping of all the handlers within CoreMedia Blueprint that are able to handle fragment requests start with service/fragment.
Default service/fragment
com.coremedia.widget.templates
Description Configures the template lookup path that is used when rendering CoreMedia Widget includes.
Default /WEB-INF/views/addons/cmlivecontext/responsive/cms/templates/
com.coremedia.fragmentConnector.defaultLocale
Description Every fragment request needs to contain the tuple (storeId, locale) because it is needed to map a request to the correct site. Using defaultLocale you can set a default that is used for every request that does not contain a custom locale. You will see how it is used later, when you see the IncludeTag in action.
Default en-US
com.coremedia.fragmentConnector.contextProvidersCSV
Description Every fragment request can be enriched with shop context specific data. It will be most likely user session related info, that is available in the commerce system and can be provided to the backend CAE via a ContextProvider implementation. See Section 5.3, “Extending the Shop Context” for details.
Default com.coremedia.livecontext.hybris.addon.contextproviders.UserContextProvider,com.coremedia.livecontext.hybris.addon.contextproviders.PreviewContextProvider
com.coremedia.fragmentConnector.isDevelopment
Description The fragment connector will return error messages that occur in the CAE while rendering a fragment if the isDevelopment parameter is set to true. For production environments you should set this option to false. Errors are logged than but do not appear on the commerce page so that the end user will not recognize the errors.
Default true
com.coremedia.fragmentConnector.disabled
Description Turn this flag to true if you want to disable the fragment connector. Disabled means that the fragment connector always delivers an empty fragment. This property is not mandatory. If this property is not set, the default is false.
Default false
com.coremedia.fragmentConnector.connectionTimeout
Description The connection timeout in milliseconds used by the fragment connector; that is the time to establish a connection. A value of "0" means "infinite".
Default 10000
com.coremedia.fragmentConnector.socketTimeout
Description The socket read timeout in milliseconds used by the fragment connector; that is the time to wait for a response after a connection has successfully been established. A value of "0" means "infinite".
Default 30000
com.coremedia.fragmentConnector.connectionPoolSize
Description Maximum number of connections used by the fragment connector.
Default 200
com.coremedia.fragmentConnector.previewCaeAccessTokenHeader
Description An optional access token that is sent along with all HTTP requests towards the CoreMedia preview CAE. Can be used by the CAE to authorize the access.
Default
com.coremedia.fragmentConnector.liveCaeAccessTokenHeader
Description An optional access token that is sent along with all HTTP requests towards the CoreMedia live CAE. Can be used by the CAE to authorize the access.
Default
com.coremedia.fragmentConnector.parameterIncludeList
Description Comma separated list of parameter names. If set, these parameters will be copied from the shop request to the CAE fragment request. All other parameter will be ignored. If set, this list has precedence over com.coremedia.fragmentConnector.parameterExcludeList.
Default
com.coremedia.fragmentConnector.parameterExcludeList
Description Comma separated list of parameter names. If set, all parameters but the configured ones will be copied from the shop request to the CAE fragment request. The property com.coremedia.fragmentConnector.parameterIncludeList has precedence.
Default

Table 3.1. CoreMedia Connector Properties


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.