    protected void run() throws Exception {
        DBService dbs = core.getDBService();
        if (!dbs.isDBSessionActive()) {
            dbs.startDBSession();
        }
        sp = dbs.attachObjectToDBSession(sp);
        HashMap<String, Object> properties = new HashMap<String, Object>();
        properties.put("project", sp);
        List<?> assosRules = dbs.findObjectsByProperties(InvocationRule.class,
                properties);
        if ((assosRules != null) && (assosRules.size() > 0)) {
            for (Object nextDAO : assosRules) {
                InvocationRule.deleteInvocationRule(dbs, 
                        core.getMetricActivator(), (InvocationRule) nextDAO);
            }
        }
        List<Plugin> ps = (List<Plugin>) dbs.doHQL("from Plugin");        
        for (Plugin p : ps ) {
            AlitheiaPlugin ap = core.getPluginAdmin().getPlugin(core.getPluginAdmin().getPluginInfo(p.getHashcode()));
            ap.cleanup(sp);
        }
        boolean success = true;
        ClusterNodeProject cnp = ClusterNodeProject.getProjectAssignment(sp);
        if (cnp != null) {
            success &= dbs.deleteRecord(cnp);
        }
        List<StoredProjectConfig> confParams = StoredProjectConfig.fromProject(sp);
        if (!confParams.isEmpty()) {
        	success &= dbs.deleteRecords(confParams);
        }
        success &= dbs.deleteRecord(sp);
        if (success) {
            dbs.commitDBSession();
        } else {
            dbs.rollbackDBSession();
        }
    }

    protected void run() throws Exception {
        DBService dbs = core.getDBService();
        if (!dbs.isDBSessionActive()) {
            dbs.startDBSession();
        }
        sp = dbs.attachObjectToDBSession(sp);
        HashMap<String, Object> properties = new HashMap<String, Object>();
        properties.put("project", sp);
        List<?> assosRules = dbs.findObjectsByProperties(InvocationRule.class,
                properties);
        if ((assosRules != null) && (assosRules.size() > 0)) {
            for (Object nextDAO : assosRules) {
                InvocationRule.deleteInvocationRule(dbs, 
                        core.getMetricActivator(), (InvocationRule) nextDAO);
            }
        }
        List<Plugin> ps = (List<Plugin>) dbs.doHQL("from Plugin");        
        for (Plugin p : ps ) {
            AlitheiaPlugin ap = core.getPluginAdmin().getPlugin(core.getPluginAdmin().getPluginInfo(p.getHashcode()));
            ap.cleanup(sp);
        }
        boolean success = true;
        List<StoredProjectConfig> confParams = StoredProjectConfig.fromProject(sp);
        if (!confParams.isEmpty()) {
        	success &= dbs.deleteRecords(confParams);
        }
        success &= dbs.deleteRecord(sp);
        if (success) {
            dbs.commitDBSession();
        } else {
            dbs.rollbackDBSession();
        }
    }
