users@glassfish.java.net

ContextInitialized method - Hibernate

From: <glassfish_at_javadesktop.org>
Date: Wed, 15 Oct 2008 03:47:53 PDT

Hello everyone.

I´ve a ServletContextListener and a contextInitialized method because I need to make come actions at my glassfish application startup. One of these action y a query to a database using a ORM (Hibernate). The problem is that it seems that at this point (contextInitialized) Hibernate hasn´t finished the mapping files so i get this error:

Illegal access: this web application instance has been stopped already?

How can I know when all startup processes have finished to make the access to database?

Thank´s.
[Message sent by forum member 'fernan3682' (fernan3682)]

http://forums.java.net/jive/thread.jspa?messageID=307368