MODE-1780 Improved web application example by using JNDI or RepositoryFactory