OperationState oldState = getOperationState();
getOperationStateThreadLocal().set(OperationState.DEPENDENCY_INJECTION);
try {
instance.injectedByEasyBeans();
} catch (EasyBeansInjectionException e) {
throw new PoolException("Cannot inject resources in the created bean", e);
} catch (RuntimeException e) {
logger.error("Error while calling injectedByEasyBeans() method on instance {0} failed", instance, e);
throw new PoolException("Cannot inject resources in the created bean", e);
} finally {
getOperationStateThreadLocal().set(oldState);
}
// call external resources injectors