Skip to content

Commit

Permalink
Fixing for the serverfailuretrigger bean already created exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nchalageri committed Sep 25, 2020
1 parent d5b71f8 commit 12643cf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion files/providers/wls_server/create.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 8 additions & 1 deletion files/providers/wls_server/modify.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 12643cf

Please sign in to comment.