String serviceType=null, searchFilter=null; Vector scopes=null;
    protected ProcessCompound getProcessCompound() throws Exception {        // get concrete type, search filter and scopes...        String serviceType=null, searchFilter=null;        Vector scopes=null;        serviceType = (String)target.sfResolve(refServiceType); // required               try {            searchFilter = (String)target.sfResolve(refSearchFilter);        }catch(SmartFrogResolutionException ex) {            searchFilter = "";        }        try {            scopes = (Vector)target.sfResolve(refScopes);        }catch(SmartFrogResolutionException ex) {            // don't care...        }                // perform SLP Discovery...        boolean discoveryCompleted = true;        try {            target.sfResolve(isDone);        }catch(SmartFrogResolutionException e) {            discoveryCompleted = false;        }        if(!discoveryCompleted) {            ServiceLocationEnumeration urls = null;            ServiceType type = null;            Context ctxt = target.getContext();            try {                if(scopes == null || scopes.isEmpty()) {                    scopes = ServiceLocationManager.findScopes();                }                type = new ServiceType(serviceType);                Properties p = getSlpConfiguration(ctxt);                ServiceLocationManager.setProperties(p);                Locator loc = ServiceLocationManager.getLocator(new Locale(p.getProperty("net.slp.locale")));                urls = loc.findServices(type, scopes, searchFilter);                            // take the first URL                ServiceURL url = (ServiceURL)urls.nextElement();                            if(url != null) {                    // set smartfrog attributes to use...                    ctxt.put("sfProcessHost", url.getHost());                    String pname = url.getURLPath();                    if(!pname.equals("")) {                        ctxt.put("sfProcessName", pname.substring(1));                    }                }            }catch(Exception ex) {                // don't care...                System.out.println(ex.toString());                ex.printStackTrace();            }            ctxt.put("discoveryDone", "true");            ctxt.remove("slpConfig");        }        return super.getProcessCompound();    }