private void populateFileStore ( Map < String , Object > properties , SIBFileStore filestore , ConfigurationAdmin configAdmin ) throws InvalidFileStoreConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "populateFileStore" , new Object [ ] { properties , filestore , configAdmin } ) ; } String [ ] sFileStore = ( String [ ] ) properties . get ( JsAdminConstants . FILESTORE ) ; if ( sFileStore == null ) { // filstore tag is not mentioned in server.xml // filestore object is already having the defaults // set the default filestore path String path = null ; path = resolveFileStorePath ( filestore . getPath ( ) ) ; filestore . setPath ( path ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( this , tc , "The filestore path: " + path ) ; SibTr . debug ( this , tc , "FileStore tag has not been defined in the server.xml file, hence defaults will be considered." ) ; } } else { pids . add ( sFileStore [ 0 ] ) ; Configuration config = null ; try { config = configAdmin . getConfiguration ( sFileStore [ 0 ] , bundleLocation ) ; } catch ( IOException e ) { SibTr . exception ( tc , e ) ; FFDCFilter . processException ( e , this . getClass ( ) . getName ( ) , "671" , this ) ; } Dictionary fsProp = config . getProperties ( ) ; // get and set filestore properties // uuid will be set by the processor String fsPath = ( String ) fsProp . get ( JsAdminConstants . PATH ) ; // Create a File to check if the path specified is absolute or relative File dummyFile = new File ( fsPath ) ; if ( dummyFile . isAbsolute ( ) ) { filestore . setPath ( fsPath ) ; } else { // If the path is relative then we will create the filestore in the directory stucture // <server_home>/messaging/<relative_path> String completePath = WsLocationConstants . SYMBOL_SERVER_OUTPUT_DIR + "/messaging/" + fsPath ; filestore . setPath ( resolveFileStorePath ( completePath ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( this , tc , "The filestore path: " + filestore . getPath ( ) ) ; } // size is given is MB in server.xml.Hence have to convert to Bytes filestore . setFileStoreSize ( ( Long ) fsProp . get ( JsAdminConstants . FILESTORESIZE ) * 1024 * 1024 ) ; filestore . setLogFileSize ( ( Long ) fsProp . get ( JsAdminConstants . LOGFILESIZE ) * 1024 * 1024 ) ; //validate the filestore settings filestore . validateFileStoreSettings ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "populateFileStore" ) ; } }
A SIBFilestore object is created using the filestore tag mentioned in the server . xml If nothing is mentioned in the server . xml the defaults are considered