private final DashboardUserManager userManager;
public PortalRestCentralServiceImpl() throws IOException, PortalAPIException {
- final ApplicationContext context = SpringContextCache.getApplicationContext();
- authManager = context.getBean(PortalAuthManager.class);
- userManager = context.getBean(DashboardUserManager.class);
- logger.debug("ctor: authManager has credentials for app {}",
- authManager.getAppCredentials().get(IPortalRestCentralService.CREDENTIALS_APP));
- logger.debug("ctor: userManager has list size {}", userManager.getUsers().size());
+ try {
+ final ApplicationContext context = SpringContextCache.getApplicationContext();
+ authManager = context.getBean(PortalAuthManager.class);
+ userManager = context.getBean(DashboardUserManager.class);
+ logger.debug("ctor: authManager fetched credentials for app {}",
+ authManager.getAppCredentials().get(IPortalRestCentralService.CREDENTIALS_APP));
+ logger.debug("ctor: userManager has list size {}", userManager.getUsers().size());
+ } catch (Exception ex) {
+ // Log the exception before it's discarded by class
+ // PortalRestAPICentralServiceImpl
+ logger.error("ctor failed", ex);
+ throw ex;
+ }
}
/*