CReplicationProject.ApplyTransaction Method

Applies any pending transactions to a Commerce Server Staging (CSS) Web content project.

Note

This method is valid only for Web content projects that have been staged by using timed release. The TransactionMethod property must be enabled for the project or the endpoint server. For more information about this property, see the CReplicationProject.Put and CReplicationServer.Put methods.

void ApplyTransaction(int flags)

Parameters

  • flags
    Reserved. Must be 0 (zero).

Remarks

You must have CSS administrator or operator rights to call this method.

The ApplyTransaction method immediately applies any transactions that are pending for the project.

Use the timed release option when you want content to be available to all users at a specific time, regardless of time zone. When you use timed release, content is deployed from the staging source server but is unavailable on the destination servers until the time that you specify, which is known as the apply time. Enable timed release on endpoint servers only. For more information about the timed release option, see How to Initiate Timed Release of a Web Content Project.

The TransactionMethod property can be enabled or disabled for a project or a server. The TransactionMethod setting for a project takes precedence over the TransactionMethod setting for the server. Use the Put method on the CReplicationProject object to set the TransactionMethod property and to enable transactions for a project. If this property has not been set for the project, CSS uses the server’s TransactionMethod property setting. If the server has transaction processing enabled, you can call the ApplyTransaction method for the Web project.

The CReplicationProject.ApplyTransaction method corresponds to the COM method named ReplicationProject.ApplyTransaction.

Example

The following example applies any pending transactions for the project named Project1.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");

  CReplicationProject replicationProject = (CReplicationProject)replicationServer.OpenProject("Project1", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);
  // Start up a client
  CReplicationClient replicationClient;
  replicationClient = (CReplicationClient)replicationProject.StartReplicationClient(0);

  // Do some replicating
  // ...

  // Commit client's actions and apply transactions
  replicationClient.Commit();
  replicationProject.ApplyTransaction(0);

See Also

Other Resources

Projects

Schedules

How to Create and Modify a Staging Project

How to Initiate Timed Release of a Web Content Project

CReplicationProject Class