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 lifecycle of managed files.

 

Managed file lifecycle

This lifecycle 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 lifecycle:

  1. 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.

  2. The EAR updater job is called through the scheduler every half hour.

    The EAR update jobs 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 neither criteria is met, no update occurs. The default amount of time is 60 minutes.

  3. The managed files are in the WebSphere Commerce EAR file and available for viewing from store pages. The managed files are stored in Managed_file_dir.

Both the time and number of files criteria for the WebSphere Commerce EAR update can be changed by your Site Administrator. Contact your Site Administrator to learn the criteria values.

 

 

Managed files and workspaces

The lifecycle of a managed file in a workspaces-enabled environment, an authoring server or a workspaces-enabled development environment, is slightly different for the lifecycle 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 lifecycle:

  1. A user chooses the workspace task they will work on.

  2. 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.

  3. 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.

  4. 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.

Related concepts

Related tasks

Related reference