This chapter describes how to manage concurrent named edit sessions in WebLogic Server Multitenant (MT). You can use either Fusion Middleware Control (FMWC), the WLS Administration Console, or WLST to manage edit sessions, as described in this chapter. The chapter refers to the Fusion Middleware and WebLogic Server documentation sets and online help for additional information as appropriate.
This chapter includes the following sections:
In previous releases, WebLogic Server configuration edit sessions supported only one active edit session at a time. The system administrator got a global edit lock, made changes, and then activated them. Other administrators could not make changes at the same time. In this release, there are situations in which more than one administrator may need to make configuration changes. A multitenant WLS domain contains multiple partitions each with its own administrator. Partition administrators must be able to make configuration changes to the partition configuration and resources deployed in the partition without affecting other partition administrators or the WLS system administrator. Therefore, WLS has enabled multiple, concurrent edit sessions which support one or more configuration edit sessions per partition plus global configuration edit sessions.
With this feature, an administrator creates a named edit session, makes changes, and then activates the changes. Another administrator also creates a named edit session in parallel. If there are conflicts between the edit session from the first administrator and the changes made by a second administrator, the second administrator will receive an error when activating their changes. The second administrator can then resolve the conflicts and activate their changes. See Managing Named Concurrent Edit Sessions: Main Steps.
The main steps for managing named concurrent edit sessions are as follows:
Administrators create (and destroy) named edit sessions.
You use the ConfigurationManagerMBean
API to start an edit session, activate changes, show changes, undo changes, and so forth.
Each edit session has its own configuration files and ConfigurationManagerMBean
instance.
Changed configuration files are persisted to an edit-session-specific directory:
Global named edit session changes are persisted to a sub-directory of a new edit directory at the domain level: <
domain-directory
>/edit/<
edit-session-name
>
, where edit-session-name is a version of the edit session name specified at create-edit-session time.
Partition-specific named edit session changes are persisted to a sub-directory of the partition directory: <
partition-directory
>/edit/<
edit-session-name
>
, where edit-session-name is a version of the edit session name specified at create-edit-session time.
Conflicts may occur between parallel edit sessions when changes are activated. If any conflicts occur during activation, then the activate operation will fail and you must resolve the conflicts manually.
Use the resolve
method to apply any concurrently applied configuration changes to the current edit session.
After calling the resolve
method, you can then proceed with the activation of pending changes in the edit session.
To resolve conflicts, administrators can use these informational messages:
Each conflict contains a description including the identification of MBeans and/or properties in conflict.
Each conflict also contains a message describing the resolve operation for this conflict.
Resolve log messages contain short descriptions of each resolve and merge step. Administrators can use the resolve log message to identify what was modified and how it was modified in the current edit session.
The following shows an example of managing configuration edit sessions using WLST:
connect("username", "password") # Enter existing named edit session or create one and enter it edit("foo") startEdit() cmo.createServer("Server-1") # Create a different edit session edit("bar") startEdit() ls("Servers") #Server-1 is not printed because it is created in an independent edit session foo s1=cmo.createServer("Server-1") s1.setListenPort(5555) # Conflicting modification - the same server with a different port # Back to edit session foo and activate edit("foo") activate() # List edit sessions / list with details showEditSession() # Lists all edit sessions showEditSession("bar") # More detailed information about edit session bar # Back to edit session bar and activate edit("bar") activate() # Conflict occurs # Resolve conflicts based on standard resolve strategy resolve() activate() # Edit sessions can also be destroyed destroyEditSession("foo") destroyEditSession("bar")
The following example shows the edit session conflict resolution in detail:
wls:/wls/edit(foo)/> showEditSession() # Lists all edit sessions List of named edit sessions [for details use showEditSession(<name>)]: default bar foo wls:/wls/edit(foo)/> showEditSession("bar") # More detailed information about edit session bar bar Creator: wls Editor (lock owner): wls Resolve recommended: Yes Contains unactivated changes: Yes wls:/wls/edit(foo)/> # Back to edit session bar and activate wls:/wls/edit(foo)/> edit("bar") You already have an edit session in progress and hence WLST will continue with your edit session. Other configuration changes were activated. Call resolve() to merge it into this edit tree. wls:/wls/edit(bar)/ !> activate() # Conflict occurs Activating all your changes, this may take a while ... The edit lock associated with this edit session is released once the activation is completed. Traceback (innermost last): File "<console>", line 1, in ? File "<iostream>", line 471, in activate File "<iostream>", line 553, in raiseWLSTException WLSTException: Error occurred while performing activate : Error while Activating changes. : 1 conflict: [1] [wls]/Servers[Server-1] - a bean with the same qualified name has already been added to [wls]. Description of resolve operation: A bean added by this session will override the one present in the current configuration. wls:/wls/edit(bar)/> # Resolve conflicts based on standard resolve strategy wls:/wls/edit(bar)/> resolve() 1 conflict: [1] [wls]/Servers[Server-1] - a bean with the same qualified name has already been added to [wls]. Description of resolve operation: A bean added by this session will override the one present in the current configuration. Patch: No difference wls:/wls/edit(bar)/ !> 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:/wls/edit(bar)/> # Edit sessions can also be destroyed wls:/wls/edit(bar)/> destroyEditSession("foo") wls:/wls/edit(bar)/> destroyEditSession("bar") Current edit tree is being removed; redirecting WLST cursor location to the config runtime tree.
For additional information, see the following:
"Manage edit sessions" and "View and resolve conflicts" in Administering Oracle WebLogic Server with Fusion Middleware Control.
"View pending changes" and "Resolve conflicts" in Oracle WebLogic Server Administration Console Online Help.