i'd like to know if there's the equivalent of Weblogic's ApplicationListener which is basically a listener packaged in the EAR which is notified via callback methods of deployment lifecycle events.
I thought of packaging a webapp in my ear with a ServletContextListener and ordering the deployment of j2ee modules within my ear (by setting module-order to strict mode in jboss-app.xml).
Is there a more elegant solution or jboss standard way for that ?
For undeployment i guess that modules are undeployed in the inverse order that they are deployed.
Thanks in advance,
The JBoss way is to create a .sar file and an MBean that receives lifecycle events. Here's an article I found quickly on creating services.
Your .sar gets bundled with your .ear ...