ProxyConfig retval;
Resource.Lock lock = null;
try {
GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class);
Resource configFile = loader.get( "proxy/proxy.xml" );
lock = configFile.lock();
InputStream proxyConfStream = configFile.in();
XStream xs = new XStream();
//Take the read lock, then read the file
retval = (ProxyConfig) (xs.fromXML(proxyConfStream));