String[] beans=SpringHarness.ctx.getBeanDefinitionNames(); for (int i=0;i<beans.length;i++) { HessianProxyFactoryBean fb = (HessianProxyFactoryBean) SpringHarness.ctx.getBean(SpringHarness.ctx.FACTORY_BEAN_PREFIX+beans[i]); String oldUrl = fb.getServiceUrl(); String service = oldUrl.substring(oldUrl.lastIndexOf("/")); fb.setServiceUrl(url+service); try { fb.afterPropertiesSet(); } catch (MalformedURLException e) { throw new OmeroException("Improperly formed url.",e); } }
String[] beans=SpringHarness.ctx.getBeanDefinitionNames(); for (int i=0;i<beans.length;i++) { if (beans[i].endsWith("Facade")){ HessianProxyFactoryBean fb = (HessianProxyFactoryBean) SpringHarness.ctx.getBean(SpringHarness.ctx.FACTORY_BEAN_PREFIX+beans[i]); String oldUrl = fb.getServiceUrl(); String service = oldUrl.substring(oldUrl.lastIndexOf("/")); fb.setServiceUrl(url+service); try { fb.afterPropertiesSet(); } catch (MalformedURLException e) { throw new OmeroException("Improperly formed url.",e); } } }
    private void resetAllFacades(String url){    		String[] beans=SpringHarness.ctx.getBeanDefinitionNames();    		for (int i=0;i<beans.length;i++) {    			HessianProxyFactoryBean fb = (HessianProxyFactoryBean) SpringHarness.ctx.getBean(SpringHarness.ctx.FACTORY_BEAN_PREFIX+beans[i]);    			String oldUrl = fb.getServiceUrl();    	        	String service = oldUrl.substring(oldUrl.lastIndexOf("/"));    			fb.setServiceUrl(url+service);    			try {    					fb.afterPropertiesSet();				} catch (MalformedURLException e) {					throw new OmeroException("Improperly formed url.",e); // TODO				}    		}    }