use of org.springframework.beans.factory.InitializingBean in project cuba by cuba-platform.
the class WebAbstractDataGrid method autowireContext.
protected void autowireContext(Renderer instance) {
AutowireCapableBeanFactory autowireBeanFactory = applicationContext.getAutowireCapableBeanFactory();
autowireBeanFactory.autowireBean(instance);
if (instance instanceof ApplicationContextAware) {
((ApplicationContextAware) instance).setApplicationContext(applicationContext);
}
if (instance instanceof InitializingBean) {
try {
((InitializingBean) instance).afterPropertiesSet();
} catch (Exception e) {
throw new RuntimeException("Unable to initialize Renderer - calling afterPropertiesSet for " + instance.getClass(), e);
}
}
}
use of org.springframework.beans.factory.InitializingBean in project cuba by cuba-platform.
the class AppUI method autowireContext.
protected void autowireContext(Object instance, ApplicationContext applicationContext) {
AutowireCapableBeanFactory autowireBeanFactory = applicationContext.getAutowireCapableBeanFactory();
autowireBeanFactory.autowireBean(instance);
if (instance instanceof ApplicationContextAware) {
((ApplicationContextAware) instance).setApplicationContext(applicationContext);
}
if (instance instanceof InitializingBean) {
try {
((InitializingBean) instance).afterPropertiesSet();
} catch (Exception e) {
throw new RuntimeException("Unable to initialize UI Component - calling afterPropertiesSet for " + instance.getClass(), e);
}
}
}
use of org.springframework.beans.factory.InitializingBean in project cuba by cuba-platform.
the class WebUiComponents method autowireContext.
protected void autowireContext(Component instance) {
AutowireCapableBeanFactory autowireBeanFactory = applicationContext.getAutowireCapableBeanFactory();
autowireBeanFactory.autowireBean(instance);
if (instance instanceof ApplicationContextAware) {
((ApplicationContextAware) instance).setApplicationContext(applicationContext);
}
if (instance instanceof InitializingBean) {
try {
((InitializingBean) instance).afterPropertiesSet();
} catch (Exception e) {
throw new RuntimeException("Unable to initialize UI Component - calling afterPropertiesSet for " + instance.getClass(), e);
}
}
}
use of org.springframework.beans.factory.InitializingBean in project Settler by EmhyrVarEmreis.
the class ExceptionHandlingAsyncTaskExecutor method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
if (executor instanceof InitializingBean) {
InitializingBean bean = (InitializingBean) executor;
bean.afterPropertiesSet();
}
}
use of org.springframework.beans.factory.InitializingBean in project mica2 by obiba.
the class MicaAsyncTaskExecutor method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
if (executor instanceof InitializingBean) {
InitializingBean bean = (InitializingBean) executor;
bean.afterPropertiesSet();
}
}
Aggregations