comp = target.sfDeployComponentDescription(appName, parent, cd, c);
     public static Prim Deploy(String url, String appName,Prim parent, Compound target,         Context c, Reference deployReference) throws SmartFrogException, RemoteException {        //First thing first: system gets initialized        //Protect system if people use this as entry point        try {            org.smartfrog.SFSystem.initSystem();        } catch (Exception ex) {            throw SmartFrogException.forward(ex);        }         Prim comp = null;         Phases top;         //To calculate how long it takes to deploy a description         long deployTime = 0;         long parseTime = 0;//         if (Logger.logStackTrace) {             deployTime = System.currentTimeMillis();//         }         if (c==null) c = new ContextImpl();           // Checks if 'parent' is a processCompound. If parent is a process compound           // the parentage is made null and it is registered as an attribute, not a           // child, so it is a root component and starts is own liveness           if ((parent!=null)&&(parent instanceof ProcessCompound)){               // This component will be a root component               parent=null;           } else if ((parent!=null)&&(parent instanceof Compound)&&(appName==null)){             //From ProcessCompoundImpl. Creates  name for unnamed components...//             appName = SmartFrogCoreKeys.SF_UNNAMED + (new Date()).getTime() + "_" +//                ProcessCompoundImpl.registrationNumber++;          }          // This is needed so that the root component is properly named          // when registering with the ProcessCompound          if ((parent==null)&&(appName!=null)) c.put("sfProcessComponentName", appName);              // The processCompound/Compound is used to do the deployment!          if ((parent!=null)&&(parent instanceof Compound)){            target = (Compound)parent;          }         try {             ComponentDescription cd;             try {                 cd = ComponentDescriptionImpl.sfComponentDescription(url,null,deployReference);//                 if (Logger.logStackTrace) {                     parseTime = System.currentTimeMillis()-deployTime;                     deployTime = System.currentTimeMillis();//                 }             } catch (SmartFrogException sfex) {                 if (sfex instanceof SmartFrogDeploymentException)                     throw sfex;                 else                     throw new SmartFrogDeploymentException(                        "deploying description '"+url+"' for '"+appName+"'",                        sfex,                        comp,                        c);             }             // sfProcessComponentName should overwrite the command line one.             if (cd.sfContainsAttribute("sfProcessComponentName")){               c.put("sfProcessComponentName",cd.sfResolve("sfProcessComponentName"));             }             comp = target.sfDeployComponentDescription(appName, parent, cd, c);             //comp = target.sfDeployComponentDescription(null, parent, cd, c);             try {                 comp.sfDeploy();             } catch (Throwable thr){                 if (thr instanceof SmartFrogLifecycleException){                     throw (SmartFrogLifecycleException) SmartFrogLifecycleException.forward(thr);                 }                 throw SmartFrogLifecycleException.sfDeploy("",thr,null);             }             try {                 comp.sfStart();             } catch (Throwable thr){                 if (thr instanceof SmartFrogLifecycleException){                     throw (SmartFrogLifecycleException) SmartFrogLifecycleException.forward(thr);                 }                 throw SmartFrogLifecycleException.sfStart("",thr,null);             }         } catch (Throwable e) {                if (comp != null) {                   Reference compName = null;                   try {                       compName = comp.sfCompleteName();                   }                   catch (Exception ex) {                   }                   try {                   comp.sfTerminate(TerminationRecord.abnormal("Deployment Failure: " + e, compName));                   } catch (Exception ex) {}                }                throw ((SmartFrogException) SmartFrogException.forward(e));       }//       if (Logger.logStackTrace) {           deployTime = System.currentTimeMillis()-deployTime;           try {               comp.sfAddAttribute("sfParseTime",new Long(parseTime));               comp.sfAddAttribute("sfDeployTime",new Long(deployTime));           } catch (Exception ex){             //ignored, this is only information           }//       }       return comp;     }