try { try { applicationContext.publishMessage(new ContextMessage.Push(this, groupContext)); } catch (Throwable t) { LOGGER.error("could not publish context change push", t);
try { try { applicationContext.publishMessage(new ContextMessage.Push(this, groupContext)); } catch (Throwable t) { final String errorMessage = "could not publish context change push";
private Map<String, Long> performRun(Check c) { // Perform the operation across all groups. Map<String, Long> counts = null; Map<String, String> grpCtx = new HashMap<String, String>(); grpCtx.put("omero.group", "-1"); try { ctx.publishMessage(new ContextMessage.Push(this, grpCtx)); try { counts = c.run(osf.getSession(), em); } finally { ctx.publishMessage(new ContextMessage.Pop(this, grpCtx)); } } catch (Throwable t) { log.error("Could not perform check!", t); throw new InternalException("Could not perform check! See server logs"); } return counts; }
/** * Send a {@link PushContextMessage} to apply this context if not null. */ void login() throws Throwable { if (c != null) { h.debug("Login: %s", c); ctx.publishMessage(new ContextMessage.Push(this, c)); } }