public Session call() throws Exception { return mgr.update(session); }}); return ex.get(future);
private Session newSession(Current __current) { EventContext ec = getEventContext(__current); Session newSession = mgr.createWithAgent( new Principal(ec.getCurrentUserName(), ec.getCurrentGroupName(), "Processing"), "OMERO.scripts", null); newSession.setTimeToIdle(0L); newSession.setTimeToLive(timeout); newSession = mgr.update(newSession, true); started = System.currentTimeMillis(); return newSession; }
public Session call() throws Exception { final CreationRequest req = new CreationRequest(); req.principal = principal; req.agent = "createSession"; if (currentSession != null) { final Experimenter sudoer = currentSession.getSudoer(); if (sudoer != null) { req.sudoer = sudoer.getId(); } } final Session session = mgr.createFromRequest(req); session.setTimeToIdle(timeToIdleMs); session.setTimeToLive(timeToLiveMs); return mgr.update(session, false); }}); return ex.get(future);