diff --git a/files/providers/wls_server/create.py.erb b/files/providers/wls_server/create.py.erb index aa2d1284..6f3bfa14 100644 --- a/files/providers/wls_server/create.py.erb +++ b/files/providers/wls_server/create.py.erb @@ -207,7 +207,14 @@ try: #FCUBS improvement print("Creating the OverloadProtection Bean CREATE!!!!") cd('/Servers/'+name+'/OverloadProtection/'+name) - cmo.createServerFailureTrigger() + server_failure_trigger_mbean = cmo.getServerFailureTrigger() + if server_failure_trigger_mbean: + print("ServerFailureTrigger has been already created") + else: + print("Creating the server failure trigger bean") + cmo.createServerFailureTrigger() + print("CREATED THE ServerFailureTrigger") + print("CREATED THE ServerFailureTrigger") cd('/Servers/'+name+'/OverloadProtection/'+name+'/ServerFailureTrigger/'+name) set_attribute_value('MaxStuckThreadTime', max_stuck_thread_time, use_default_value_when_empty) diff --git a/files/providers/wls_server/modify.py.erb b/files/providers/wls_server/modify.py.erb index f206afc4..fc5c5702 100644 --- a/files/providers/wls_server/modify.py.erb +++ b/files/providers/wls_server/modify.py.erb @@ -240,7 +240,14 @@ try: # Added for the FCUBS best practices print("Creating the OverloadProtection Bean Inside Modify!!!!") cd('/Servers/'+name+'/OverloadProtection/'+name) - cmo.createServerFailureTrigger() + server_failure_trigger_mbean = cmo.getServerFailureTrigger() + if server_failure_trigger_mbean: + print("ServerFailureTrigger has been already created") + else: + print("Creating the server failure trigger bean") + cmo.createServerFailureTrigger() + print("CREATED THE ServerFailureTrigger") + cd('/Servers/'+name+'/OverloadProtection/'+name+'/ServerFailureTrigger/'+name) set_attribute_value('MaxStuckThreadTime', max_stuck_thread_time, use_default_value_when_empty)