}
Object idMappings = null;
try {
if (this.thisAppCtx == null) {
ElasticContext thatAppCtx = ElasticContext.discoverElasticContext();
idMappings = thatAppCtx.findBeanByID(ID_MAPPING_BEAN_NAME);
} else {
try {
idMappings = this.thisAppCtx.getBean(ID_MAPPING_BEAN_NAME);
} catch (NoSuchBeanDefinitionException e) {
ElasticContext thatAppCtx = ElasticContext.discoverElasticContext();
idMappings = thatAppCtx.findBeanByID(ID_MAPPING_BEAN_NAME);
}
}
} catch (Exception e) {
throw new RuntimeException("Problem manually retrieving bean '" +
ID_MAPPING_BEAN_NAME + "': " + e.getMessage(), e);