/** * Will be called in a synchronized block by {@link SessionCache} in order * to allow for an update. */ @SuppressWarnings({"rawtypes" }) public SessionContext reload(final SessionContext ctx) { List list = (List) executor.execute(asroot, new Executor.SimpleWork( this, "reload", ctx.getSession().getUuid()) { @Transactional(readOnly = true) public Object doWork(org.hibernate.Session session, ServiceFactory sf) { /* user and group names may change while the session is open */ final LocalAdmin admin = (LocalAdmin) sf.getAdminService(); final Experimenter exp = admin.userProxy(ctx.getCurrentUserId()); final ExperimenterGroup grp = admin.groupProxy(ctx.getCurrentGroupId()); final Principal p = new Principal(exp.getOmeName(), grp.getName(), ctx.getCurrentEventType()); return executeSessionContextLookup(sf, p, exp, grp, ctx.getSession()); } }); if (list == null) { return null; } return createSessionContext(list, ctx); }
+ principal); SessionContext newctx = createSessionContext(rv, null);
final SessionContext newctx = createSessionContext(list, ctx); final Session copy = copy(orig); executor.execute(asroot, new Executor.SimpleWork(this, "update") {