Change 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 copying the files to the WebSphere Commerce EAR file, the ScheduledContentManagedFileEARUpdate job checks to ensure that the following criteria are met:
- If a sufficient number of files have been uploaded, the managed files are copied to the WebSphere Commerce EAR file, regardless of the time that has passed since the last update.
- If a fixed amount of time has passed and at least one managed file has been uploaded, the managed files are copied to the WebSphere Commerce EAR file, regardless of the number of files the were uploaded since the last update.
- If neither criterion is met, no update occurs.
To change the parameters that control when a managed file is copied from the WebSphere Commerce database to the WebSphere Commerce EAR file:
- Open the WebSphere Commerce configuration file in a text editor.
- 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>- Update the parameters in the EvaluationCriteria element:
- minNumOfFileForUpdate
- Enter the minimum number of files to be uploaded before the files are copied 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.
- 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 required to update all copies of the WebSphere Commerce EAR file. The exact amount of time 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.
- Save your changes.
- Propagate your changes to the WebSphere Commerce configuration file.
- Stop and restart WebSphere Commerce.
Related Concepts
Catalog and marketing attachments
Attachment characteristics
Store preview
Managed files
Jobs
Scheduler
Related tasks
Add or removing a catalog attachment