private Entity innerRetrieveEntityFromRepository ( Root root , Entity retEntDO , String uniqueId , boolean isAllowOperationIfReposDown , Set < String > failureRepositoryIds ) throws WIMException { String METHODNAME = "retrieveEntityFromRepository" ; List < String > reposIds = getRepositoryManager ( ) . getRepoIds ( ) ; for ( int i = 0 ; ( i < reposIds . size ( ) && retEntDO == null ) ; i ++ ) { String reposId = reposIds . get ( i ) ; try { Root retRoot = getRepositoryManager ( ) . getRepository ( reposId ) . get ( root ) ; if ( retRoot != null ) { List < Entity > entList = retRoot . getEntities ( ) ; if ( entList . size ( ) >= 1 ) { retEntDO = entList . get ( 0 ) ; } } } catch ( EntityNotFoundException e ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHODNAME + " EntityNotFoundException[reposId=" + reposId + "] - " + uniqueId ) ; } } catch ( WIMSystemException wse ) { String message = wse . getMessage ( ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHODNAME + " WSE message = " + message ) ; } if ( message != null && message . contains ( "CWIML4520E" ) && message . contains ( "javax.naming.InvalidNameException" ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHODNAME + " WIMSystemException [reposId=" + reposId + "] - " + message ) ; } } else throw wse ; } catch ( Exception e ) { if ( ! isAllowOperationIfReposDown ) { if ( e instanceof WIMException ) { throw ( WIMException ) e ; } throw new WIMException ( e ) ; } else { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , METHODNAME + " IGNORE: exception [" + e . getMessage ( ) + "] when retrieve entity from repository [" + reposId + "]" ) ; failureRepositoryIds . add ( reposId ) ; } } } return retEntDO ; }
Method created so we can ffdc the inner EntityNotFoundException