Changing managed file WebSphere Commerce EAR updater parameters

When you upload an attachment asset file, the file is initially copied to the WebSphere Commerce database. When certain criteria are met, the attachment asset file is copied from the WebSphere Commerce database to the WebSphere Commerce EAR file. Until the attachment asset is available in the WebSphere Commerce EAR file, you can view the attachment file only in a store page using the preview function in WebSphere Commerce Accelerator.

Copying the file from the WebSphere Commerce database to the WebSphere Commerce EAR file is done by the ScheduledContentManagedFileEARUpdate scheduled job. The ScheduledContentManagedFileEARUpdate job is initially scheduled to run every half-hour. For information about changing the schedule of the ScheduledContentManagedFileEARUpdate job, refer to Scheduler.

Before you copy the files to the WebSphere Commerce EAR file, the ScheduledContentManagedFileEARUpdate job checks to ensure that the following criteria are met:

  • If enough files are uploaded, the managed files are copied to the WebSphere Commerce EAR file, regardless of the time that passes since the last update.
  • If a fixed amount of time passes and at least one managed file is uploaded, the managed files are copied to the WebSphere Commerce EAR file. This copying occurs regardless of the number of files that are uploaded since the last update.
  • If neither criterion is met, no update occurs.

Procedure

To change the parameters that control when a managed file is copied from the WebSphere Commerce database to the WebSphere Commerce EAR file:
  1. Open the WebSphere Commerce configuration file in a text editor.
  2. Find the ScheduledContentManagedFileEARUpdateConfiguration tag.

    The ScheduledContentManagedFileEARUpdateConfiguration tag resembles the following text:

    
    <ManagedFileUpdateEARConfiguration display="false">
       <ContentManagedFileEARUpdate
    Implementation="com.ibm.commerce.filepublish.util.ContentManagedFileEARUpdateImpl"
    />
       <ContentManagedFileHandler
    Implementation="com.ibm.commerce.filepublish.util.ContentManagedFileHandlerImpl"
    />
       <ProductionServerInformation applicationName="wcs_demo" />
       <ModuleInformation moduleName="Stores.war" />
       <EvaluationCriteria 
    minNumOfFilesForUpdate="10"
                           
    minSecFromLastUpload="3600" />
    </ManagedFileUpdateEARConfiguration>
    
  3. Update the parameters in the EvaluationCriteria element:
    minNumOfFileForUpdate
    Enter the minimum number of files to be uploaded before the files are copied to the WebSphere Commerce EAR file.

    If this number is met or exceeded when the ScheduledContentManagedFileEARUpdate job runs, the managed files are copied to the WebSphere Commerce EAR file. The default minimum number of files is 10.

    maxNumOfFilesForUpdate
    Enter the maximum number of files that can be included within a batch that is being uploaded during file deployment.
    minSecFromLastUpload
    Enter the maximum amount of time (in seconds) that can pass since the last file was uploaded before the files are copied to the WebSphere Commerce EAR. The default is 3600 seconds (60 minutes).

    In a federated environment, do not set this time lower than the amount of time that is required to update all copies of the WebSphere Commerce EAR file. The exact amount of time that is taken to complete the update depends on the size of the managed files and the size of WebSphere Commerce EAR file. At a minimum, do not set a time lower than 600 seconds (10 minutes).

    If the specified amount of time passes and at least one new file is uploaded, the managed files are copied to the WebSphere Commerce EAR file.

  4. Save your changes.
  5. Propagate your changes to the WebSphere Commerce configuration file.
  6. Stop and restart WebSphere Commerce.