Changing managed file EAR updater parameters
When you upload an attachment asset file, the file is initially copied to the database. When certain criteria are met, the attachment asset file is copied from the database to the EAR file. Until the attachment asset is available in the EAR file, you can view the attachment file only in a store page using the preview function in .
Copying the file from the database to the EAR file is done by the ScheduledContentManagedFileEARUpdate scheduled job. The ScheduledContentManagedFileEARUpdate job is initially scheduled to run every half-hour.
Before you copy the files to the 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 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 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
- Open the 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 to the EAR file.
If this number is met or exceeded when the ScheduledContentManagedFileEARUpdate job runs, the managed files are copied to the 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 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 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 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 EAR file.
- Save your changes.
- Propagate your changes to the configuration file.
- Stop and restart .