that's how the session factory should be gotten:
protected SessionFactory getSessionFactory() { try { return (SessionFactory) new InitialContext() .lookup("SessionFactory"); } catch (Exception e) { } }
Please provide a simple solution for Tomcat6 to be able to get SessionFactory thru simple jndi lookup in Java code. What should be written in what file on the side of Tomcat ?