Automatic deployment of component-based applications