1 26 27 package org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.root; 28 29 import org.objectweb.openccm.descriptor.componentassembly.ccm.deployer.base.FatalDeploymentException; 30 import org.omg.Components.CCMObject; 31 import org.omg.Components.InvalidConfiguration; 32 33 39 public class ComponentassemblyDeployer 40 extends ComponentassemblyDeployerContext 41 { 42 67 public void deploy() 68 throws FatalDeploymentException 69 { 70 getDeploymentLogger().log("<<STEP2>> Begin the information reading"); 71 getDeploymentLogger().log("<</STEP2>> Information reading ended"); 75 getDeploymentLogger().log("<<STEP3>> Begin the component installation"); 77 getPartitioningDeployer().deploy(); 78 getDeploymentLogger().log("<</STEP3>>Component installation ended"); 79 getDeploymentLogger().log("<<STEP4>> Establishing component connections"); 80 if (getConnectionsDeployer() != null) 81 getConnectionsDeployer().deploy(); 82 83 getLifeCycleManager().stepEndedSuccessFully(); 84 getDeploymentLogger().log("<</STEP4>> Component connections established" ); 85 } 86 91 public void configueCompleteComponents() 92 throws FatalDeploymentException 93 { 94 CCMObject [] list=getComponents(); 95 try{ 96 for(int i=0;i<list.length;i++){ 97 (new ComponentCompleter(list[i])).start(); 98 } 99 } 100 catch(StartingError e){ 101 throw new FatalDeploymentException(e.getException(),"A component cannot be started\n"); 102 } 103 104 } 105 110 public void tearDown() 111 throws FatalDeploymentException 112 { 113 getDeploymentLogger().log("<</STEP5>> Teardowning the assembly" ); 114 if (getConnectionsDeployer() != null) 116 getConnectionsDeployer().tearDown(); 117 getPartitioningDeployer().tearDown(); 118 119 getLifeCycleManager().stepEndedSuccessFully(); 120 getDeploymentLogger().log("<</STEP5>> Assembly teardowned successfully" ); 121 } 122 123 124 125 } 126 | Popular Tags |