Administer > Manage WebSphere Commerce features > Marketing > Catalog and marketing attachments
Managed files
Any file uploaded to WebSphere Commerce using the catalog and marketing attachments tools in WebSphere Commerce Accelerator or the fileloader utility becomes a managed file. You can also load managed files using the fileloader utility. This section discuss the life cycle of managed files.
Managed file life cycle
This life cycle described here is different if you are working within a workspace. For more information, refer to Managed files and workspaces.
Managed files are initially written to the WebSphere Commerce database. Once certain criteria are met, managed files are copied from the WebSphere Commerce database to the WebSphere Commerce EAR file.
In a federated environment, all copies of the WebSphere Commerce EAR file are updated automatically. Updating all Commerce nodes in a federated environment is not an instantaneous process. The exact amount of time taken to complete the update depends on the size of the managed file and the size of WebSphere Commerce EAR file.
You cannot view the managed file as an attachment in a store page until the managed file is available in the WebSphere Commerce EAR file. As long as the attachment asset is only available in the WebSphere Commerce database, you can only view the file in a store page using the preview function.
A managed file follows the following life cycle:
- A user uploads the file using the catalog and marketing attachments tools in WebSphere Commerce Accelerator or the fileloader utility and the file is stored in the WebSphere Commerce database.
- The EAR updater job, ScheduledContentManagedFileEARUpdateCmdImpl, is called by the scheduler every half hour.
ScheduledContentManagedFileEARUpdateCmdImp checks for the following criteria:
- If a sufficient number of files have been uploaded, the managed files are written to the WebSphere Commerce EAR file, regardless of the time passed since the last update. The default number of files is 10.
- If a fixed amount of time has passed and at least one managed file has been uploaded, the managed files are written to the WebSphere Commerce EAR file, regardless of the number of files uploaded since the last update.
- If there is a large number of files to update, these files are split into segments. Each segment deals with a fixed number of files. The default number of files is 100.
- If neither criteria is met, no update occurs. The default amount of time is 60 minutes.
- The managed files are in the WebSphere Commerce EAR file and available for viewing from store pages. The Managed Files are stored in the databases in the tables (CMFILE, CMSMALLFILE, and CMLARGEFILE). These managed files are organized in a directory structure under the database table CMFILEDIR (which is the Managed File Directory).
- The managed files are published to the production environment using the fileprop utility.
Both the time and number of files criteria for the WebSphere Commerce EAR update can be changed by the Site Administrator. Contact the Site Administrator to learn the criteria values.
Managed files and workspaces
The life cycle of a managed file in a workspaces-enabled environment, an authoring server or a workspaces-enabled development environment, is slightly different for the life cycle described earlier. If you upload a managed file in a workspace, that file is only available in that workspace. The file is not available to other workspaces or people using the production-ready data until the workspace is committed.
From a workspace, a managed file has the following life cycle:
- A user chooses the workspace task they will work on.
- The use uploads the file using the catalog and marketing attachments tools in WebSphere Commerce Accelerator or the fileloader utility and the file is stored in the workspace database schema.
At this point, the managed file is only available to users of the same workspace and can only be seen using the store preview function.
- The workspace is committed to the production-ready data.
The managed files are in the WebSphere Commerce EAR file and available for viewing from store pages.
- The managed files are published to the production environment using the fileprop utility.
Managed files published from an authoring server to a production server are not copied to the WebSphere Commerce database on the production server.