cdInfo.sfAddAttribute("sfCodeBase", targetCodeBase); cdInfo.sfAddAttribute("java.class.path", System.getProperty("java.class.path")); cdInfo.sfAddAttribute("org.smartfrog.sfcore.processcompound.sfProcessName", System.getProperty("org.smartfrog.sfcore.processcompound.sfProcessName"));
try { if (targetCodeBase != null) cdInfo.sfAddAttribute("sfCodeBase", targetCodeBase); cdInfo.sfAddAttribute("java.class.path",System.getProperty("java.class.path")); cdInfo.sfAddAttribute("org.smartfrog.sfcore.processcompound.sfProcessName", System.getProperty("org.smartfrog.sfcore.processcompound.sfProcessName")); } catch (SmartFrogException sfex){ if (sflog.isDebugEnabled()) sflog.debug("",sfex); }
    protected Class getPrimClass() throws Exception {        String targetCodeBase=null;        String targetClassName=null;        Object obj=null;        try {            // extract code base            targetCodeBase = getSfCodeBase(target);            // extract class name            obj =  target.sfResolve(refClass);            targetClassName = (String) obj;            // We look in the default code base if everything else fails.            return SFClassLoader.forName(targetClassName,targetCodeBase, true);        } catch (SmartFrogResolutionException resex) {            resex.put(SmartFrogRuntimeException.SOURCE, target.sfCompleteName());            resex.fillInStackTrace();            throw resex;        } catch (java.lang.ClassCastException ccex){            Object name = null;            if (target.sfContext().containsKey(SmartFrogCoreKeys.SF_PROCESS_COMPONENT_NAME)) {                name =target.sfResolveHere(SmartFrogCoreKeys.SF_PROCESS_COMPONENT_NAME,false);            }            throw new SmartFrogDeploymentException (refClass,null,name,target,              null,"Wrong class when resolving '"+refClass+ "': '"              +obj+"' ("+obj.getClass().getName()+")" , ccex, targetCodeBase);        } catch (java.lang.ClassNotFoundException cnfex){            Object name = null;            if (target.sfContext().containsKey(SmartFrogCoreKeys.SF_PROCESS_COMPONENT_NAME)) {                name =target.sfResolveHere(SmartFrogCoreKeys.SF_PROCESS_COMPONENT_NAME,false);            }            ComponentDescription cdInfo = new ComponentDescriptionImpl(null,new ContextImpl(),false);            cdInfo.sfAddAttribute("sfCodeBase", targetCodeBase);            cdInfo.sfAddAttribute("java.class.path", System.getProperty("java.class.path"));            cdInfo.sfAddAttribute("org.smartfrog.sfcore.processcompound.sfProcessName",               System.getProperty("org.smartfrog.sfcore.processcompound.sfProcessName"));            throw new SmartFrogDeploymentException (refClass,null,name,target,null,"Class not found", cnfex, cdInfo);        }    }