baliukas wrote:
http://www.onjava.com/pub/a/onjava/2001/04/12/listeners.html
Great read, thanks. Some println debugging showed me that when jboss starts it does initialize my SessionManager class well before the hibernate session factory is bound to JNDI. Therefore, SessionManager initialization fails, and the class definition is not made, due to the fact that it looks up "java:/hibernate/SessionFactory" before the session factory is bound. However, the question still remains as to why this started happening all of a sudden.
Is it guaranteed that ServletContextListener.contextInitialized will be called at the very end of application start up? The article claims this method is called with the webapp is ready to service its first request, so I assume this is true. I'm hoping that I can get rid of the NoClassDefFoundError by initializing my SessionFactory in the contextInitialized method.