private void setLocation ( String _location ) { String res = null ; File resFile = null ; boolean relativePath = true ; boolean defaultPath = false ; // try as "absolute" resource (contains symbol, or absolute path) try { res = cfgSvc . resolveString ( _location ) ; resFile = new File ( res ) ; relativePath = ! resFile . isAbsolute ( ) ; } catch ( IllegalStateException e ) { // ignore } if ( resFile == null || ( ! resFile . isFile ( ) && relativePath ) ) { // look for resource in server config location try { res = cfgSvc . resolveString ( LibertyConstants . DEFAULT_CONFIG_LOCATION + _location ) ; resFile = new File ( res ) ; } catch ( IllegalStateException e ) { // ignore } if ( resFile == null || ! resFile . isFile ( ) ) { // fall back to creating for resource in shared output location try { res = cfgSvc . resolveString ( LibertyConstants . DEFAULT_OUTPUT_LOCATION + _location ) ; resFile = new File ( res ) ; defaultPath = true ; } catch ( IllegalStateException e ) { // ignore } } } // Work against the symbol in the original location // The original location may be been if ( isDefault && ( defaultPath || locationInOutputDir ( _location ) ) ) { this . initializeAtStartup = true ; } // reset location w/ resolved value // isDefault tested because the default path's file may not exists (and that's OK) if ( ( res != null && resFile . isFile ( ) ) || isDefault ) { this . location = res ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Found store under [" + location + "]" ) ; } } else { // If it wasn't found then it's likely going to trigger // the load.error later. Issue a warning to explain the file // could not be found. Tr . warning ( tc , "ssl.keystore.not.found.warning" , res , name ) ; } }
Set the physical location of this store to the input value . This method will resolve all symbolic names in the location . If location is just a file name then we assume its location is the LibertyConstants . DEFAULT_CONFIG_LOCATION .