@ Override public ModuleMetaData createModuleMetaData ( ExtendedModuleInfo moduleInfo ) throws MetaDataException { WebModuleInfo webModule = ( WebModuleInfo ) moduleInfo ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "createModuleMetaData: " + webModule . getName ( ) + " " + webModule . getContextRoot ( ) ) ; } try { com . ibm . wsspi . adaptable . module . Container webModuleContainer = webModule . getContainer ( ) ; WebAppConfiguration appConfig = webModuleContainer . adapt ( WebAppConfiguration . class ) ; String appName = appConfig . getApplicationName ( ) ; String j2eeModuleName = appConfig . getJ2EEModuleName ( ) ; WebModuleMetaDataImpl wmmd = ( WebModuleMetaDataImpl ) appConfig . getMetaData ( ) ; wmmd . setJ2EEName ( j2eeNameFactory . create ( appName , j2eeModuleName , null ) ) ; appConfig . setWebApp ( createWebApp ( moduleInfo , appConfig ) ) ; return wmmd ; } catch ( Throwable e ) { Throwable cause = e . getCause ( ) ; MetaDataException m ; if ( ( cause != null ) && ( cause instanceof MetaDataException ) ) { m = ( MetaDataException ) cause ; //don't log a FFDC here as we already logged an exception } else { m = new MetaDataException ( e ) ; FFDCWrapper . processException ( e , getClass ( ) . getName ( ) , "createModuleMetaData" , new Object [ ] { webModule , this } ) ; //this throws the exception } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "createModuleMetaData: " + webModule . getName ( ) + "; " + e ) ; } throw m ; } }
This will create the metadata for a web module in the web container