Weblogic 12c – change console preferences using python and wlst image 7

Weblogic 12c – change console preferences using python and wlst

You can configure some features of the Administration Console by setting preferences manualy in the console. For some features you need to restart the Admin server.

In a provisoned environment you will need this to be automated. For this example i used wlst and python.

In this case there is an oracle bug which results in when one of the host machines is shut down, the admin console is very slow to respond.

 

A workaround for this is:

Login to the adminconsole

Goto:

On the mydomain > Configuration > general > Advanced page:
Change the parameter “Invocation Timeout Seconds” into 2

On the Preferences page > Shared Preferences (Tab):
Change the parameter “Management Operation Timeout” into 5

 

The parameter “Management Operation Timeout” can be managed with a WLST script.

There is a property file to set the parameter with a value

domain.invocationtimeout=2

domain.managementoperationtimeout=5

The wlst script reads the property file. if does noet exists then sets the default value to “0”

image

depending on the outcome it will set value

image

It is not possible to manage the parameter “Invocation Timeout Seconds” with WLST. I used python because there are enough suitable XML parsers in combination with Pretty Print.

Depending if the parameter is used it wil be created in the file ConsolePreferences.xml. located in /domains/domainName /servers/domainName + -adminServer/data/console.

 

if it does not exists. It will created the proper setting

image

 

If the parameter exists it wil replace the value

image