protected HttpSession getSessionFromTransaction ( final HttpServletRequest servletRequest , final String txId ) { final Principal userPrincipal = servletRequest . getUserPrincipal ( ) ; final String userName = userPrincipal == null ? null : userPrincipal . getName ( ) ; final FedoraSession session = batchService . getSession ( txId , userName ) ; final HttpSession batchSession = new HttpSession ( session ) ; batchSession . makeBatchSession ( ) ; LOGGER . debug ( "Returning a session in the batch {} for user {}" , batchSession , userName ) ; return batchSession ; }
Retrieve a JCR session from an active transaction