org.jboss.hibernate.session.HibernateContext has been deprecated in version 3.1.x of Hibernate.http://docs.jboss.org/jbossas/jboss4guide/r3/html/ch13.htmlis where I got the reference to this class. Is there a replacement for it? or do I just use the code:InitialContext ctx = new InitialContext();SessionFactory factory = (SessionFactory) ctx. lookup("java:/hibernate/CaveatEmptorSessionFactory");Session hsession = factory.openSession();