private class AppDeployEventListener implements EventListener {
public void event(Event event) {
Application app = null;
if (Deployment.MODULE_LOADED.equals(event.type())) {
ModuleInfo moduleInfo = (ModuleInfo) event.hook();
if (moduleInfo instanceof ApplicationInfo) {
return;
}
WebBundleDescriptor webBD =
(WebBundleDescriptor) moduleInfo.getMetaData(
"org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl");
loadPolicy(webBD, false);
} else if (Deployment.APPLICATION_LOADED.equals(event.type())) {
ApplicationInfo appInfo = (ApplicationInfo) event.hook();
app = appInfo.getMetaData(Application.class);