[CXF-6121] Optimizing a bit SpringResourceFactory