At the moment, container stops the database resources before the EJBs are stopped.
Hmm, probably because there's no explicit dependency specified on the database resource (datasource?) in the EJBs. How does the EJB access the database resource? Through datasources?
Yes, we use standard JBoss datasource files and JPA and ORM technology. The datausources are not part of the EAR.
What is the recommended way of shutting down an EJB module in order to be able to cleanup? At the moment, we use an external event that informs the application to finish all transactions, and not to start new transactions. If someone forgets the send this event, then we have a problem.
Is there perhaps a possibility to define an interceptor that we could use instead of this external event?
Thanks for your help