private JcrSession openSession ( ) throws ResourceException { try { Repository repo = mcf . getRepository ( ) ; Session s = repo . login ( cri . getCredentials ( ) , cri . getWorkspace ( ) ) ; return ( JcrSession ) s ; } catch ( RepositoryException e ) { throw new ResourceException ( "Failed to create session: " + e . getMessage ( ) , e ) ; } }
Create a new session .