@@ -482,35 +482,21 @@ private static boolean updateDynamicClusterSizeWithServiceURL(final WlsClusterCo
482
482
LOGGER .entering ();
483
483
484
484
boolean result = false ;
485
- try {
486
- // start a WebLogic edit session
487
- // httpClient.executePostUrlOnServiceClusterIP(START_EDIT_SESSION_URL, serviceURL, "");
488
- // LOGGER.info(MessageKeys.WLS_EDIT_SESSION_STARTED);
489
-
490
- // Create machine(s)
491
- String newMachineNames [] = wlsClusterConfig .getMachineNamesForDynamicServers (machineNamePrefix , targetClusterSize );
492
- for (String machineName : newMachineNames ) {
493
- LOGGER .info (MessageKeys .WLS_CREATING_MACHINE , machineName );
494
- httpClient .executePostUrlOnServiceClusterIP (WlsMachineConfig .getCreateUrl (),
495
- serviceURL , WlsMachineConfig .getCreatePayload (machineName ), true );
496
- }
497
-
498
- // Update the dynamic cluster size of the WebLogic cluster
499
- String jsonResult = httpClient .executePostUrlOnServiceClusterIP (
500
- wlsClusterConfig .getUpdateDynamicClusterSizeUrl (),
501
- serviceURL ,
502
- wlsClusterConfig .getUpdateDynamicClusterSizePayload (targetClusterSize ), true ).getResponse ();
503
-
504
- // // activate the WebLogic edit session
505
- // httpClient.executePostUrlOnServiceClusterIP(ACTIVATE_EDIT_SESSION_URL, serviceURL, "", true);
506
-
507
- result = wlsClusterConfig .checkUpdateDynamicClusterSizeJsonResult (jsonResult );
508
- // LOGGER.info(MessageKeys.WLS_EDIT_SESSION_ACTIVATED);
509
- } catch (HTTPException httpException ) {
510
- // cancel the WebLogic edit session
511
- // httpClient.executePostUrlOnServiceClusterIP(CANCEL_EDIT_SESSION_URL, serviceURL, "");
512
- // LOGGER.info(MessageKeys.WLS_EDIT_SESSION_CANCELLED);
485
+ // Create machine(s)
486
+ String newMachineNames [] = wlsClusterConfig .getMachineNamesForDynamicServers (machineNamePrefix , targetClusterSize );
487
+ for (String machineName : newMachineNames ) {
488
+ LOGGER .info (MessageKeys .WLS_CREATING_MACHINE , machineName );
489
+ httpClient .executePostUrlOnServiceClusterIP (WlsMachineConfig .getCreateUrl (),
490
+ serviceURL , WlsMachineConfig .getCreatePayload (machineName ));
513
491
}
492
+
493
+ // Update the dynamic cluster size of the WebLogic cluster
494
+ String jsonResult = httpClient .executePostUrlOnServiceClusterIP (
495
+ wlsClusterConfig .getUpdateDynamicClusterSizeUrl (),
496
+ serviceURL ,
497
+ wlsClusterConfig .getUpdateDynamicClusterSizePayload (targetClusterSize )).getResponse ();
498
+
499
+ result = wlsClusterConfig .checkUpdateDynamicClusterSizeJsonResult (jsonResult );
514
500
LOGGER .exiting (result );
515
501
return result ;
516
502
}
0 commit comments