DM Deployment Target

Showing results for 
Search instead for 
Did you mean: 

DM Deployment Target

0 0 1,780

Obsolete Pages{{Obsolete}}

The official documentation is at:


The DM Deployment Target receives a deployment from an Alfresco WCM authoring environment and puts the content into the workspace spaces store where it can be used to support a dynamic web site.

The DM Deployment Target is a target which is registered with the repository based WCM Deployment Engine.   It is part of the Enterprise 3.2r release.

By default its target name is 'alfresco' although of course this can be changed through configuration.


Store name mapping

The authoring environment for a WCM Web Project consists of a set of related AVM stores.    There is a staging store, one or more author stores and possibly workflow stores.    The different stores have a naming convention for their store names.

The consolidate flag says deploy all these related stores to the same location.    If it is turned off by setting deployment.dmr.consolidate to false there will be a separate paths for each store and content will be duplicated in the DM store. 


deployment.dmr.consolidate= true | false

You can use spring to plug in your own implementation of the StoreNameMapper interface to control your project name mappings.

Root location mapping

The default implementation of RootMapper, the RootMapperImpl class, allows you to specify a default location for all web projects and also a map of mappings, one for each web project

By default the web projects are deployed to /app:company_home/app:wcm_deployed.  

Extending the DM Deployment Target

Root Mapper

The RootMapper interface allows you plug in your own mapping between web project and the destination of the contents of the web project.

prepare callback

The prepare callbacks (which are also implementations of the same FSDeploymentRunnable interface used in postCommit callbacks) are called by the DM Deployment Target immediately after the complete set of deployment files have been transferred to the DM Deployment Targets's temporary storage areas.  

If exceptions are thrown by the callbacks then the deployment will fail and be rolled back. The exception will be propagated to the system calling the DM Deployment Target and the exception should be logged on both Deployment Engine and calling system.

The callbacks occur within the deployment transaction so should minimise the time they take to run since there are resources waiting for deployment to complete.

postCommit callback

There is a postCommit callback available which is called after each successful deployment.

If exceptions are thrown by the callbacks then the exceptions will be logged.   But it is too late to do anything else.

There is a sample adapter that will call an operating system command, such as a batch script, or the callback can call a custom java class.

The callback(s) are configured in the 'target' properties of the deployment configuration.  They are called in sequence.

Diagram to show the FSDeploymentRunnable class

FSDeployment runnable class.jpg

Users need to implement the 'FSDeploymentRunnable' interface.

Two implementations are provided.

SampleRunnable : an example java class that demonstrates how to use this feature
ProgramRunnable : execute a operating system command after deployment

Example showing how to configre a post commit callback for a DM Deployment Target

<property name='postCommit'>
        <bean class='org.alfresco.deployment.SampleRunnable'/>