code: public Collection<Membership> findMembershipsByUser(String userName) throws Exception
     {
        Session session = service.getStorageSession();
        try
        {
           return findMembershipsByUser(session, userName).memberships;
        }
        finally
        {
           session.logout();
        }
     }
docs: {@inheritDoc}