Tracking Configuration Changes Using WLST Online to Update an Existing WebLogic Domain

Configuring Existing WebLogic Domains 6-3 Started edit session, please be sure to save and activate your changes once you are done. wls:mydomainedit cmo.setProductionModeEnabledtrue wls:mydomainedit activate Activating all your changes, this may take a while ... The edit lock associated with this edit session is released once the activation is completed. The following non-dynamic attributes have been changed on MBeans that require server re-start: MBean Changed : com.bea:Name=AdminServer,Type=WebServerLog,Server=AdminServer, WebServer=AdminServer Attributes changed : RotateLogOnStartup MBean Changed : com.bea:Name=AdminServer,Type=WebServerLog,Server=AdminServer, WebServer=AdminServer Attributes changed : RotateLogOnStartup MBean Changed : com.bea:Name=Domain1,Type=Log Attributes changed : RotateLogOnStartup Activation completed wls:mydomainedit exit

6.1.1 Tracking Configuration Changes

For all changes that are initiated by WLST, you can use the showChanges command which displays all the changes that you made to the current configuration from the start of the WLST edit session, including any MBean operations that were implicitly performed by the server. See Example 6–3 . Example 6–3 Displaying Changes connectusername,password wls:mydomainserverConfig edit wls:mydomainedit startEdit Starting an edit session ... Started edit session, please be sure to save and activate your changes once you are done. wls:mydomainedit cmo.createServermanaged2 [MBeanServerInvocationHandler]mydomain:Name=managed2,Type=Server wls:mydomainedit cdServersmanaged2 wls:mydomaineditServersmanaged2 cmo.setListenPort7702 wls:mydomaineditServersmanaged2 cmo.setListenAddresslocalhost wls:mydomaineditServersmanaged2 showChanges Changes that are in memory and saved to disc but not yet activated are: All changes that are made but not yet activated are: MBean Changed : com.bea:Name=Len,Type=Domain Operation Invoked : create Attribute Modified : Servers Attributes Old Value : null Attributes New Value : managed2 Server Restart Required : false MBean Changed : com.bea:Name=managed2,Type=Server Operation Invoked : modify Attribute Modified : ListenPort Attributes Old Value : null Attributes New Value : 7702 Server Restart Required : false 6-4 Oracle Fusion Middleware Oracle WebLogic Scripting Tool wls:mydomaineditServersmanaged2 save Saving all your changes ... Saved all your changes successfully. wls:mydomainedit activate Activating all your changes, this may take a while ... The edit lock associated with this edit session is released once the activation is completed. Activation completed wls:mydomaineditServersmanaged2 The WLST online script in Example 6–4 connects WLST to a running server instance as an administrator, gets the activation task, and prints the user and the status of the task. It also prints all the changes that took place. The getActivationTask function provides information about the activation request and returns the latest ActivationTaskMBean which reflects the state of changes that a user is currently making or made recently in the current WLST session. You invoke the methods that this interface provides to get information about the latest activation task in progress or just completed. For detailed information, see ActivationTaskMBean in the Oracle WebLogic Server MBean Reference. Example 6–4 Checking the Activation Task at = getActivationTask changes = at.getChanges newstate = at.getState print The user for this Task is +at.getUser+ and the state is: print newstate print The changes are: print changes

6.1.2 Undoing or Canceling Changes