* @TODO don't like this, we need to make the attribute over-write atomic with child registration (Patrick).
* TODO don't like this, we need to make the attribute over-write atomic with child registration (Patrick).
    public Prim sfDeployComponentDescription(Object name, Prim parent,            ComponentDescription cmp, Context parms) throws SmartFrogDeploymentException {        // check for attribute already named like given name        try {            Object res = ((parent == null) || (name == null)) ? null: sfResolveHere(name,false);            if ((res != null) && !(res instanceof ComponentDescription)) {                throw new SmartFrogDeploymentException(null, parent.sfCompleteName() ,                            name, cmp, parms,MessageUtil.                                formatMessage(MSG_NON_REP_ATTRIB, name), null,null);            }            if (sfLog().isTraceEnabled()){              StringBuffer message = new StringBuffer();              try {                message.append(this.sfCompleteNameSafe());                message.append(" is deploying: ");                if (name != null) {                  message.append(name);                } else {                  message.append("no-name");                }                if (parent != null) {                  message.append(", Parent: ");                  message.append(parent.sfCompleteName());                }                message.append(", Component description: ");                message.append(cmp.toString());                if (parms != null) {                  message.append(", Params: ");                  message.append(parms.toString());                }              } catch (Throwable  thr) {                sfLog().trace("",thr);              }              sfLog().trace(message.toString());            }            // try to deploy            Prim result = SFDeployer.deploy(cmp, null, parent, parms);            /**             *             * @TODO don't like this, we need to make the attribute over-write atomic with child registration (Patrick).             *             */            if (parent != null){                if (name != null) {                  parent.sfReplaceAttribute(name, result);                  result.sfParentageChanged(); // yuk.... see todo above!                } else {                    //@TODO - Review after refactoring ProcessCompound                    //This should throw an excetion when a                    //component is registered without a name                    //in a processcompound, but compound should not know anything                    //about processcompound                }            }            return result;        } catch (SmartFrogDeploymentException dex) {            // It will build source recursively            Reference newRef =new Reference();            if (name==null) {                //@todo review methods for compDesc                if (cmp.sfContext().containsKey(SmartFrogCoreKeys.SF_PROCESS_COMPONENT_NAME))                    name =cmp.sfContext().get(SmartFrogCoreKeys.SF_PROCESS_COMPONENT_NAME);                try {                    newRef = parent.sfCompleteName();                } catch (Exception ex){                    // LOG ex                    ignoreThrowable("could not get complete name", ex);                }            }            if ((dex.get(SmartFrogDeploymentException.OBJECT_NAME))!=null) {                newRef.addElement (ReferencePart.here(name));            } else {                dex.add(SmartFrogDeploymentException.OBJECT_NAME, name);            }            if (dex.get(SmartFrogDeploymentException.SOURCE)!=null) {                newRef.addElements((Reference)dex.get(SmartFrogDeploymentException.SOURCE));            }            if (newRef.size()!=0) {                dex.put(SmartFrogDeploymentException.SOURCE, newRef);            }            throw dex;        } catch (Throwable thr) {            throw (SmartFrogDeploymentException)SmartFrogDeploymentException.forward(thr);        }    }