return (Object) retryTemplate.execute(new DefaultRetryCallback() {
public Object doWithRetry() {
// before checking for a service, check whether the proxy is still valid
if (destroyed && !isDuringDestruction)
throw new ServiceProxyDestroyedException();
return (wrapper != null) ? wrapper.getService() : null;
}
});
}