ResourceAccessManager manager = GeoServerExtensions.bean(ResourceAccessManager.class);
if (manager == null) {
DataAccessManager daManager = lookupDataAccessManager();
manager = new DataAccessManagerAdapter(daManager);
}
LocalWorkspaceResourceAccessManager lwManager = new LocalWorkspaceResourceAccessManager();
lwManager.setDelegate(manager);
return lwManager;
}