Skip to main content
Version: 8.4.x

Spring Configuration

Elastic Path provides two files for overriding Spring configuration in your deployed Elastic Path applications:

  • ep.properties

    Defines properties that can be used as configuration values in Spring XML.

  • ep.override.properties

    Overrides the values of any Spring bean in the application Spring configuration.

ep.properties​

Using the ep.properties file provides a convenient way to provide configuration values to your deployed applications. This is enabled by the context:property-placeholder functionality in Spring.

The Self-Managed Commerce services will read this file at startup from any of the following locations:

  • /etc/ep/ep.properties
  • /ep/conf/ep.properties
  • /ep/conf/ep.[SERVICE_NAME].properties
  • ${user.home}/ep/ep.properties
  • ${user.home}/ep/conf/ep.properties
  • ${user.home}/ep/conf/ep.[SERVICE_NAME].properties

Where [SERVICE_NAME] is replaced with the appropriate service name from the list below:

  • integration
  • search
  • cm
  • cortex
  • batch
  • datasync
  • importexport
  • datapopulation

These property values can be referenced in any Spring XML file using the following syntax:

${property.key}
${property.key:override}

Where property.key represents the key defined in the ep.properties file, and override is an optional value that can be specified if the property key is not defined in ep.properties.

The subsections below describe built-in properties that can be overridden through ep.properties.

Batch Server Properties​

ep.cm.topseller.delay​

Developer Default: 30000

Specifies the initial delay (in milliseconds) before the server will start to calculate the top sellers

ep.cm.topseller.interval​

Developer Default: 30000

Specifies the delay (in milliseconds) between recalculations of the top sellers

ep.cm.productrecommendation.delay​

Developer Default: 30000

Specifies the initial delay (in milliseconds) before the server will start to calculate product recommendations

ep.cm.productrecommendation.interval​

Developer Default: 30000

Specifies the delay (in milliseconds) between recalculations of product recommendations

ep.cm.searchterms.aggregator.delay​

Developer Default: 30000

Specifies the delay (in milliseconds) before the server will start tracking search term activity.

ep.cm.searchterms.aggregator.interval​

Developer Default: 30000

Specifies the delay (in milliseconds) between updates of search term activity tracking.

ep.batch.job.releaseShipment.cronExpression​

Default: 0 * * * * ? (run every minute)

Specifies the cron expression for the order release for shipment job.

ep.batch.job.cleanupOrderLocks.cronExpression​

Default: 0 0 * * * ? (run every hour)

Specifies the cron expression for the order locks cleanup job.

ep.batch.job.cleanupExpiredOAuth2Tokens.cronExpression​

Default: 0 0 0 * * ? (run every day at midnight)

Specifies the cron expression for the expired OAuth2 tokens cleanup job.

ep.batch.job.cleanupAbandonedCarts.cronExpression​

Default: 0 30 * * * ? (run every hour at 30 minutes past the hour)

Specifies the cron expression for the abandoned shopping carts cleanup job.

ep.batch.job.abandonedCartEvents.cronExpression​

Default: 0 0 0 * * ? (run every day at midnight)

Specifies the cron expression for the abandoned cart events job.

ep.batch.job.cleanupInactiveCarts.cronExpression​

Default: 0 15 * * * ? (run every hour at 15 minutes past the hour)

Specifies the cron expression for the inactive shopping carts cleanup job.

ep.batch.job.cleanupAnonymousCustomers.cronExpression​

Default: 0 5 * * * ? (run every hour at 5 minutes past the hour)

Specifies the cron expression for the anonymous customers cleanup job.

ep.batch.job.cleanupFailedOrders.cronExpression​

Default: 0 45 * * * ? (run every hour at 45 minutes past the hour)

Specifies the cron expression for the failed orders cleanup job.

ep.batch.job.cleanupOrphanedOrderPaymentInstruments.cronExpression​

Default: 0 0 0 * * ? (run every day at midnight)

Specifies the cron expression for the orphaned order payment instruments cleanup job.

ep.batch.job.cleanupOrphanedOrderPaymentGuids.cronExpression​

Default: 0 0 0 * * ? (run every day at midnight)

Specifies the cron expression for the orphaned order payment instrument guids cleanup job.

ep.batch.job.cleanupOrphanedPaymentInstruments.cronExpression​

Default: 0 0 0 * * ? (run every day at midnight)

Specifies the cron expression for the orphaned payment instruments cleanup job.

ep.batch.job.cleanupChangesets.cronExpression​

Default: 0 0 0 * * ? (run every day at midnight)

Specifies the cron expression for the change sets cleanup job.

ep.batch.job.expiredDataPointValuesJobProcessor.cronExpression​

Default: 0 0 1 * * ? (run every day at 1 am)

Specifies the cron expression for the expired data point values cleanup job.

ep.batch.job.dataPointRevokedConsentsJobProcessor.cronExpression​

Default: 0 0 * * * ? (run every hour)

Specifies the cron expression for the data point revoked consents job.

ep.batch.job.relayOutboxMessages.cronExpression​

Default: * * * * * ? (run every second)

Specifies the cron expression for the relay outbox messages job.

ep.batch.job.cleanupCompletedOrders.cronExpression​

Default: 0 30 * * * ? (run every hour at 30 minutes past the hour)

Specifies the cron expression for the completed orders cleanup job.

ep.batch.job.encryptCustomerPasswords.cronExpression​

Default: 0 0 2 * * ? (run every day at 2 am)

Specifies the cron expression for the customer passwords encryption job.

Search Server Properties​

ep.search.contextURL​

Developer Default: /searchserver

The search server web application context.

ep.search.port.http​

Developer Default: 8080

The search server HTTP port.

ep.index.build.delay​

Developer Default: 10000

Specifies the initial delay (in milliseconds) before the server will start to update the customer search index.

ep.index.build.interval​

Developer Default: 5000

Specifies the delay (in milliseconds) between updates of the customer search index.

ep.search.triggers​

Disables Search Server indexing when set to disabled. This setting is used to disable the Search replica’s indexing. For more information, see Search Server Clustering.

Cortex Properties​

bundle.environment​

Developer Default: dev-bundles

Specifies the Cortex work environment. Possible values are dev-bundles or prod-bundles.

bundle.location​

Developer Default: ${project.build.directory}/extensions

Specifies where Cortex Resource Extensions are deployed.

JMS (Java Messaging Service) Properties​

ep.jms.type​

Developer Default: org.apache.activemq.pool.PooledConnectionFactory

The Java Class type of the JMS Broker Connection Factory.

ep.jms.factory​

Developer Default: org.apache.activemq.jndi.JNDIReferenceFactory

The JNDI resource factory used by the application.

ep.jms.url​

Developer Default: tcp://localhost:61616

The URL of the JMS broker.

Global Settings​

ep.external.ehcache.xml.path​

Specifies the path to the external Ehcache configuration file. This property affects all web applications (Cortex, CM Server, Search Server and Integration Server). For more information, see Configuring Ehcache.

The file path in ep.external.ehcache.xml.path must be absolute. The supported formats are shown in the following examples:

  • Using Home Directory: ${user.home}/ep/conf/cache/ehcache.xml
  • Absolute Path:
    • Linux: /ep/conf/cache/ehcache.xml
    • Windows: c:/ep/conf/cache/ehcache.xml
  • File:
    • Linux: file:///ep/conf/cache/ehcache.xml
    • Windows: file:///c:/ep/conf/cache/ehcache.xml
Additional Slash

The additional slash in file:/// is required by Spring.

ep.database.timezone​

Specifies the time zone to display in Commerce Manager. Set this value to any valid UTC time offset, time zone abbreviation, or tz database time zone value. We recommend the tz database time zone values so that the system properly adapts to time zone changes. Default is UTC time offset.

ep.override.properties​

Using the ep.override.properties file provides a way to override the values of any bean running in a deployed applications. This is enabled by the context:property-override functionality in Spring.

The Self-Managed Commerce services will read this file at startup from any of the following locations:

  • /etc/ep/ep.override.properties
  • /ep/conf/ep.override.properties
  • /ep/conf/ep.[SERVICE_NAME].override.properties
  • ${user.home}/ep/ep.override.properties
  • ${user.home}/ep/conf/ep.override.properties
  • ${user.home}/ep/conf/ep.[SERVICE_NAME].override.properties

Where [SERVICE_NAME] is replaced with the appropriate service name from the list below:

  • integration
  • search
  • cm
  • cortex
  • batch
  • datasync
  • importexport
  • datapopulation

Overriding Bean Property with a Simple Value​

To override a Spring bean property with a simple value use the following syntax:

beanName.propertyName=value
  • beanName: The bean id
  • propertyName: The property name to override
  • value: The new value of the property

For example, the following settings override OpenJPA’s DataCache and RemoteCommitProvider beans:

entityManagerFactory.jpaPropertyMap[openjpa.DataCache]=true
entityManagerFactory.jpaPropertyMap[openjpa.RemoteCommitProvider]=sjvm

Overriding Bean Property with a Bean Reference​

To override a Spring bean property with a reference to another bean use the following syntax:

beanName.propertyName=#{newBeanName}
  • beanName: The bean id
  • propertyName: The property name to override
  • newBeanName: The new id of the bean

For example, the following setting enables topSellerJob (disabled by default using the disabled list, a Spring bean defined in commerce-engine/batch/ep-batch/src/main/filtered-resources/spring/scheduling/quartz-setup.xml) in the Batch Server:

topSellerSchedulingTriggersMerger.mergeList=#{topSellerSchedulingTriggers}