public FilterInstanceWrapper getFilterInstanceWrapper ( String filterName ) throws ServletException { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . entering ( CLASS_NAME , "getFilterInstanceWrapper" , "entry for " + filterName ) ; try { FilterInstanceWrapper filterInstW ; // see if the filter is already loaded filterInstW = ( FilterInstanceWrapper ) ( _filterWrappers . get ( filterName ) ) ; if ( filterInstW == null ) { //PM01682 Start synchronized ( webAppConfig . getFilterInfo ( filterName ) ) { // may be more are waiting for lock, check and see if the filter is already loaded filterInstW = ( FilterInstanceWrapper ) ( _filterWrappers . get ( filterName ) ) ; if ( filterInstW == null ) { // filter not loaded yet...create an instance wrapper filterInstW = loadFilter ( filterName ) ; } } //PM01682 End } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . exiting ( CLASS_NAME , "getFilterInstanceWrapper" , "exit for " + filterName ) ; } return filterInstW ; } catch ( ServletException e ) { // logServletError(filterName, // nls.getString("Failed.to.load.filter","Failed to load filter"), // e); com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( e , "com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper" , "166" , this ) ; throw e ; } catch ( Throwable th ) { // logServletError(filterName, // nls.getString("Failed.to.load.filter","Failed to load filter"), // th); com . ibm . wsspi . webcontainer . util . FFDCWrapper . processException ( th , "com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper" , "172" , this ) ; throw new ServletException ( MessageFormat . format ( "Filter [{0}]: could not be loaded" , new Object [ ] { filterName } ) , th ) ; } }
Returns a FilterInstanceWrapper object corresponding to the passed in filter name . If the filter inst has previously been created return that instance ... if not then create a new filter instance