// store the thread's context class loader for later use in on the fly loading of proxy handler app contexts
this.tccl = Thread.currentThread().getContextClassLoader();
// The common proxy handler beans context is loaded first using the Platform common beans context as parent
// load this from classpath as it is packaged with the binaries
ApplicationContextFactory defaultCtxFactory = null;
for (BootstrapExtension be : this.loadedBootstrapExtensions) {
if (ApplicationContextFactory.class.isAssignableFrom(be.getClass())) {
defaultCtxFactory = (ApplicationContextFactory) be;
break;
}
}
// we look up the unique instance of ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG. This call would throw an exception if multiple are found
String commonProxyBeansFileName = FileLocator.findUniqueFile(ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG).getAbsolutePath();
ServiceProxyComponentContainer.commonProxyHandlerBeansContext = new ClassPathXmlApplicationContext(new String[]{ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG}, defaultCtxFactory.getCommonBeansContext());
// add the common proxy beans independently to the list of proxy handler contexts as common handlers are declared there
this.handlerConfigInfoList.add(new HandlerConfigInfo(new File(commonProxyBeansFileName), null, ServiceProxyComponentContainer.commonProxyHandlerBeansContext));
// Get the Config Service Bean
this.configService = (SPConfigServiceImpl<T>) ServiceProxyComponentContainer.commonProxyHandlerBeansContext.getBean(ServiceProxyComponentContainer.CONFIG_SERVICE_BEAN);