Hi,
We would likje to migrate our App Server from JRun to Tomcat 5
In our webapps code, we have quanties of :
Quote:
SessionFactory sf = (SessionFactory) new InitialContext().lookup("hbm/myFactory");
sqlSession = sf.openSession();
The problem, as described in
http://www.hibernate.org/114.html
is that Tomcat JNDI context is not writable at WebApp startup.
The mentioned describes some ways to Use Static SessionFactories, but nothing seems to be really clear!
The way I prefer is the use of the ThreadLocal, but I should change every opening of session code.
Did you succeed in configuring tomcat for Hibernate in a smarter way ?
Thanks
Franck