public static void reloadApplications ( LibertyServer server , final Set < String > appIdsToReload ) throws Exception { ServerConfiguration config = server . getServerConfiguration ( ) . clone ( ) ; /* * Get the apps to remove. */ ConfigElementList < Application > toRemove = new ConfigElementList < Application > ( config . getApplications ( ) . stream ( ) . filter ( app -> appIdsToReload . contains ( app . getId ( ) ) ) . collect ( Collectors . toList ( ) ) ) ; /* * Remove the applications. */ config . getApplications ( ) . removeAll ( toRemove ) ; updateConfigDynamically ( server , config , true ) ; /* * Reload applications. */ config . getApplications ( ) . addAll ( toRemove ) ; updateConfigDynamically ( server , config , true ) ; }
Reload select applications .