Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.management.mbeanservers.edit
Interface ConfigurationManagerMBean

All Superinterfaces:
Service

public interface ConfigurationManagerMBean
extends Service

Manages changes to the configuration of the current WebLogic Server domain. The operations in this MBean start and stop edit sessions, save, undo, and activate configuration changes.

The general process for changing the configuration of a domain is as follows:

  1. Use this MBean's startEdit() operation to start an edit session.

    When you start an edit session, WebLogic Server locks other users from editing the pending configuration MBean hierarchy. If two users start an edit session under the same user identity, changes from both users are collected into a single set of changes.

    The operation returns the pending DomainMBean, which is the root of the configuration MBean hierarchy.

  2. Navigate to an MBean and change the value of its attributes or add or remove a child MBean.

  3. Save your changes.

    Your saved changes are written to the domain's pending configuration files.

  4. (Optional) Make additional changes or undo the changes.

  5. Use this MBean's activate() operation to activate the saved changes.

    When you activate, the changes are propagated to all the servers in the domain and applied to the running configuration.

Since:
9.0.0.0

Field Summary
static String OBJECT_NAME
          This is the ObjectName under which this service is registered in the MBeanServer

 

Method Summary
abstract  ActivationTaskMBean activate(long timeout)
          Activates the changes that have been saved to the pending configuration files.
abstract  void cancelEdit()
          Cancels the current edit session, releases the edit lock, and enables other users to start an edit session.
abstract  void enableOverwriteComponentChanges()
          Force the pending changes to all system components in the next activate
abstract  ActivationTaskMBean[] getActivationTasks()
          Returns the list of all ActivationTaskMBean instances that have been created.
abstract  ActivationTaskMBean[] getActiveActivationTasks()
          Contains the ActivationTaskMBeans that provide information about activation tasks that are in progress.
abstract  Change[] getChanges()
          Contains Change objects for all of the unsaved changes in the current edit session.
abstract  Change[] getChangesToDestroyBean(DescriptorBean configurationMBean)
          Contains Change objects for the changes required to destroy the specified instance of a configuration bean.
abstract  ActivationTaskMBean[] getCompletedActivationTasks()
          Contains all ActivationTaskMBeans that are stored in memory and that describe activation tasks that have completed.
abstract  long getCompletedActivationTasksCount()
          The maximum number of ActivationTaskMBeans that WebLogic Server keeps in memory.
abstract  String getCurrentEditor()
          The name of the user who started the current edit session.
abstract  long getCurrentEditorExpirationTime()
          The time at which the current edit session expires as determined by the timeout parameter of the startEdit operation.
abstract  long getCurrentEditorStartTime()
          The time at which the current edit session started.
abstract  String getEditSessionName()
          Returns the name of the edit session.
abstract  FileChange[] getFileChanges()
          Returns a FileChange object for each affected files in the current edit session.
abstract  PropertyValueVBean[] getPropertyValues(ConfigurationMBean bean, String[] propertyNames)
          Describes assignment of value to selected properties of a config bean
abstract  PropertyValueVBean[] getPropertyValues(ConfigurationMBean configBean, String[] navigationAttributeNames, SettableBean[] beans, String[] propertyNames)
          Describes assignment of value to selected properties of a bean within a ConfigurationMBean's object graph.
abstract  AutoResolveResult getStartEditResolveResult()
          Method startEdit() contains optional resolve(stopOnConflict=true) operation in case when this session is suspicions that it is stale.
abstract  Change[] getUnactivatedChanges()
          Contains Change objects for all changes (saved or unsaved) that have been made since the activate operation completed successfully.
abstract  boolean haveUnactivatedChanges()
          Returns true if any changes (saved or unsaved) have been made since the activate operation completed successfully.
abstract  boolean isCurrentEditorExclusive()
          Whether the edit session is exclusive as determined by the exclusive parameter of the startEdit operation.
abstract  boolean isCurrentEditorExpired()
          Whether the edit session is expired as determined by the timeout parameter of the startEdit operation.
abstract  boolean isEditor()
          Returns true if the caller started the current edit session.
abstract  boolean isMergeNeeded()
          Returns true only if another session might have been activated since the last resolve.
abstract  void purgeCompletedActivationTasks()
          Purges from memory all ActivationTaskMBeans that represent completed activation tasks.
abstract  void reload()
          Reloads the configuration files from the pending directory updates the configuration contained in the Edit MBeanServer.
abstract  void removeReferencesToBean(DescriptorBean configurationMBean)
          Removes references to bean that must be removed in order to destroy the specified instance of a configuration bean.
abstract  ActivationTaskMBean resolve(boolean stopOnConflict, long timeout)
          Resolve changes with global edit configuration.
abstract  void save()
          Validates unsaved changes and saves them to the pending configuration files on disk.
abstract  void setCompletedActivationTasksCount(long maxCount)
          Sets the maximum number of ActivationTaskMBeans that WebLogic Server keeps in memory.
abstract  DomainMBean startEdit(int waitTimeInMillis, int timeOutInMillis)
          Starts an edit session on behalf of the currently authenticated user and prevents other users from editing the configuration for the duration of the session.
abstract  DomainMBean startEdit(int waitTimeInMillis, int timeOutInMillis, boolean exclusive)
          Starts an edit session on behalf of the currently authenticated user and prevents other users from editing the configuration for the duration of the session.
abstract  void stopEdit()
          Stops the current edit session, releases the edit lock, and enables other users to start an edit session.
abstract  void undo()
          Undoes all unsaved changes.
abstract  void undoUnactivatedChanges()
          Undoes all of the changes (saved or unsaved) that have been made since the activate operation completed successfully.
abstract  void validate()
          Verifies that all unsaved changes satisfy dependencies between MBean attributes and makes other checks that cannot be made at the time that you set the value of a single attribute.

 

Methods inherited from interface weblogic.management.mbeanservers.Service
getName, getParentAttribute, getParentService, getPath, getType

 

Field Detail

OBJECT_NAME

static final String OBJECT_NAME

This is the ObjectName under which this service is registered in the MBeanServer

Method Detail

startEdit

DomainMBean startEdit(int waitTimeInMillis,
                      int timeOutInMillis)
                      throws EditTimedOutException

Starts an edit session on behalf of the currently authenticated user and prevents other users from editing the configuration for the duration of the session. A user must call this operation before modifying the configuration of the domain.

If two users or processes start an edit session under the same user identity, changes from both users are collected into a single set of changes.

Parameters:
waitTimeInMillis - Prevents other uses from starting an edit session until waitTimeInMillis expires, edits are activated, or the edit session is stopped. If the value of waitTimeInMillis is 0 and an edit session is active, this operation returns immediately. To block indefinitely, specify a value of -1.
timeOutInMillis - Specifies the number of milliseconds after which the lock on the configuration is no longer guaranteed. This time out is enforced lazily. If no other user starts an edit session after the timeout expires, the unsaved changes are left intact and may be saved. If another user starts an edit session after the timeout expires, unsaved changes are automatically reverted and the lock is given to that new user. Specify a value of -1 to indicate that you do not want the edit to time out. In this case, if you do not stop your edit session, only an administrator can stop the edit session by invokeing the cancelEdit operation.
Returns:
DomainMBean the root of the domain's configuration MBean hierarchy
Throws:
EditTimedOutException - thrown when the start edit request times out because the wait time has elasped and another user still has the edit session.

startEdit

DomainMBean startEdit(int waitTimeInMillis,
                      int timeOutInMillis,
                      boolean exclusive)
                      throws EditTimedOutException

Starts an edit session on behalf of the currently authenticated user and prevents other users from editing the configuration for the duration of the session. A user must call this operation before modifying the configuration of the domain.

Prevents multiple users or processes from starting an edit session under the same user identity.

Parameters:
waitTimeInMillis - Prevents other uses from starting an edit session until waitTimeInMillis expires, edits are activated, or the edit session is stopped. If the value of waitTimeInMillis is 0 and an edit session is active, this operation returns immediately. To block indefinitely, specify a value of -1.
timeOutInMillis - Specifies the number of milliseconds after which the lock on the configuration is no longer guaranteed. This time out is enforced lazily. If no other user starts an edit session after the timeout expires, the unsaved changes are left intact and may be saved. If another user starts an edit session after the timeout expires, unsaved changes are automatically reverted and the lock is given to that new user. Specify a value of -1 to indicate that you do not want the edit to time out. In this case, if you do not stop your edit session, only an administrator can stop the edit session by invokeing the cancelEdit operation.
exclusive - Specifies whether the edit session should be exclusive. An edit session will cause a subsequent call to startEdit by the same owner to wait until the edit session lock is released.
Returns:
DomainMBean the root of the domain's configuration MBean hierarchy
Throws:
EditTimedOutException - thrown when the start edit request times out because the wait time has elasped and another user still has the edit session.

getStartEditResolveResult

AutoResolveResult getStartEditResolveResult()

Method startEdit() contains optional resolve(stopOnConflict=true) operation in case when this session is suspicions that it is stale. Method provides result information. Result can be null if resolve operation was not included.


stopEdit

void stopEdit()
              throws NotEditorException

Stops the current edit session, releases the edit lock, and enables other users to start an edit session. Any unsaved changes are discarded.

This operation can be invoked only by the user who started the edit session.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.

cancelEdit

void cancelEdit()

Cancels the current edit session, releases the edit lock, and enables other users to start an edit session. Any unsaved changes are discarded; saved changes remain pending.

This operation can be called by any user with administrator privileges, even if the user is not the one who started the edit session. Use this operation to cancel an edit session when the current editor can not be contacted to stop an edit session and release the lock. To instead discard all changes, saved and unsaved, see the undoUnactivatedChanges operation.


getCurrentEditor

String getCurrentEditor()

The name of the user who started the current edit session.

Returns:
the user that is currently editing the configuration.

isEditor

boolean isEditor()

Returns true if the caller started the current edit session.

Returns:
true if the caller is the current editor, false otherwise.

getCurrentEditorStartTime

long getCurrentEditorStartTime()

The time at which the current edit session started.

Returns:
long starting time in milliseconds. If no current edit session, returns 0,

getCurrentEditorExpirationTime

long getCurrentEditorExpirationTime()

The time at which the current edit session expires as determined by the timeout parameter of the startEdit operation.

Returns:
long expiration time in milliseconds. If no current edit session or lock does not expire, returns 0.

isCurrentEditorExclusive

boolean isCurrentEditorExclusive()

Whether the edit session is exclusive as determined by the exclusive parameter of the startEdit operation.

Returns:
boolean true is edit session is exclusive, false otherwise. If no current edit session, returns false.

isCurrentEditorExpired

boolean isCurrentEditorExpired()

Whether the edit session is expired as determined by the timeout parameter of the startEdit operation.

Returns:
boolean true is edit session is expired, false otherwise. If no current edit session, returns false.

getChanges

Change[] getChanges()
                    throws NotEditorException

Contains Change objects for all of the unsaved changes in the current edit session. Each change to an MBean attribute is represented in its own Change object.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.

getFileChanges

FileChange[] getFileChanges()

Returns a FileChange object for each affected files in the current edit session. Each FileChange object represents a File that was either: edited, added or removed.


validate

void validate()
              throws NotEditorException,
                     ValidationException

Verifies that all unsaved changes satisfy dependencies between MBean attributes and makes other checks that cannot be made at the time that you set the value of a single attribute.

The save operation also validates changes, but you can use this (validate) operation to check that changes are valid before saving them.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.
ValidationException - thrown if an validation error occurs while validating changes.

reload

void reload()
            throws NotEditorException,
                   ValidationException

Reloads the configuration files from the pending directory updates the configuration contained in the Edit MBeanServer.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.
ValidationException - thrown if an validation error occurs while reloading files.

save

void save()
          throws NotEditorException,
                 ValidationException

Validates unsaved changes and saves them to the pending configuration files on disk.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.
ValidationException - thrown if an validation error occurs while saving changes.

undo

void undo()
          throws NotEditorException

Undoes all unsaved changes. This reverts the hierarchy of pending configuration MBeans to the last saved state of the pending configuration files, discarding in-memory changes.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.

haveUnactivatedChanges

boolean haveUnactivatedChanges()

Returns true if any changes (saved or unsaved) have been made since the activate operation completed successfully. This includes any changes that have been saved but not activated in the current and previous edit sessions.

Returns:
true if any changes have been made, false otherwise.

getUnactivatedChanges

Change[] getUnactivatedChanges()
                               throws NotEditorException

Contains Change objects for all changes (saved or unsaved) that have been made since the activate operation completed successfully. This includes any changes that have been saved but not activated in the current and previous edit sessions.

Each change to an MBean attribute is described in its own Change object.

Returns:
Change[] an array of Change elements describing the changes to the configuration
Throws:
NotEditorException - thrown if the caller did not start the current edit session.

undoUnactivatedChanges

void undoUnactivatedChanges()
                            throws NotEditorException

Undoes all of the changes (saved or unsaved) that have been made since the activate operation completed successfully. This includes any changes that have been saved but not activated in the current and previous edit sessions.

This reverts the hierarchy of pending configuration MBeans to the last successful activate state of the domain, discarding any changes made but not activated.

Throws:
NotEditorException - thrown if the caller did not start the current edit session.

activate

ActivationTaskMBean activate(long timeout)
                             throws NotEditorException

Activates the changes that have been saved to the pending configuration files.

To activate changes, WebLogic Server copies the pending configuration files to a pending directory within each server instance's root directory. Each server instance determines whether it can consume the changes. If all servers can, then the pending configuration files become the active configuration files and the in-memory hierarchy of active configuration MBeans is updated for each server.

If any server is unable to consume the change, then the activation fails for all servers. All saved changes remain in the pending configuration files and can be activated later.

Parameters:
timeout - long that contains the time (milliseconds) for the operation to complete. If the elasped time exceeds that value, then the activation of the configuration changes will be canceled. If -1, then the activation will not timeout. If a non-zero timeout is specified, then the activate will wait until the activate operation has completed or until the timeout period has elasped. If a zero timeout is specified, then the activate will return immediately and the caller can wait for completion using the ActivationTaskMBean.
Returns:
ActivationTaskMBean the MBean that indicates the status of the activate operation.
Throws:
NotEditorException - thrown if the caller did not start the current edit session.
ActivateConflictException - thrown if an activate operation fails due to conflicts.

getCompletedActivationTasks

ActivationTaskMBean[] getCompletedActivationTasks()

Contains all ActivationTaskMBeans that are stored in memory and that describe activation tasks that have completed.

Returns:
ActivationTaskMBean[] an array of Activation Tasks that have completed.

getCompletedActivationTasksCount

long getCompletedActivationTasksCount()

The maximum number of ActivationTaskMBeans that WebLogic Server keeps in memory.

Each ActivationTaskMBean contains one Change object for each change that was activated. The MBean and its Change objects describe which user activated the changes, when the changes were activated, and which MBean attributes were modified.

WebLogic Server does not save this data to disk, and therefore it is not available across sessions of the Administration Server.

Because a large collection of ActivationTaskMBean MBeans could potentially use a significant amount of memory, the default number is 10.

Returns:
long maximum number of completed ActivationTaskMBeans that are kept in memory.

setCompletedActivationTasksCount

void setCompletedActivationTasksCount(long maxCount)

Sets the maximum number of ActivationTaskMBeans that WebLogic Server keeps in memory.

Parameters:
maxCount - - the maximum number of completed ActivationTaskMBeans that are kept in memory.

getActiveActivationTasks

ActivationTaskMBean[] getActiveActivationTasks()

Contains the ActivationTaskMBeans that provide information about activation tasks that are in progress.

Returns:
ActivationTaskMBean[] an array of Activation Tasks that are active.
See Also:
ActivationTaskMBean

purgeCompletedActivationTasks

void purgeCompletedActivationTasks()

Purges from memory all ActivationTaskMBeans that represent completed activation tasks.


getActivationTasks

ActivationTaskMBean[] getActivationTasks()

Returns the list of all ActivationTaskMBean instances that have been created.


getChangesToDestroyBean

Change[] getChangesToDestroyBean(DescriptorBean configurationMBean)

Contains Change objects for the changes required to destroy the specified instance of a configuration bean. Each change to an MBean attribute is represented in its own Change object.

Parameters:
configurationMBean -
Returns:
Change[] an array of Change objects that represent the changes required to release the bean.

removeReferencesToBean

void removeReferencesToBean(DescriptorBean configurationMBean)
                            throws NotEditorException

Removes references to bean that must be removed in order to destroy the specified instance of a configuration bean.

Parameters:
configurationMBean -
Throws:
NotEditorException - thrown if the caller did not start the current edit session.

enableOverwriteComponentChanges

void enableOverwriteComponentChanges()
                                     throws NotEditorException,
                                            IOException

Force the pending changes to all system components in the next activate

Throws:
NotEditorException
IOException

getEditSessionName

String getEditSessionName()

Returns the name of the edit session.

Returns:
String name of this edit session. If the global edit session, then null is returned.

resolve

ActivationTaskMBean resolve(boolean stopOnConflict,
                            long timeout)
                            throws EditException

Resolve changes with global edit configuration.

Parameters:
stopOnConflict - if true then resolve will apply only if there is no conflicting change.
timeout - resolve timeout.
Throws:
EditException

getPropertyValues

PropertyValueVBean[] getPropertyValues(ConfigurationMBean bean,
                                       String[] propertyNames)
                                       throws Exception

Describes assignment of value to selected properties of a config bean

Parameters:
bean - the bean with properties to be examined
propertyNames - names of properties on the bean to be analyzed
Returns:
one object for each property reporting its effective value and how the property's value was determined
Throws:
Exception

getPropertyValues

PropertyValueVBean[] getPropertyValues(ConfigurationMBean configBean,
                                       String[] navigationAttributeNames,
                                       SettableBean[] beans,
                                       String[] propertyNames)
                                       throws Exception

Describes assignment of value to selected properties of a bean within a ConfigurationMBean's object graph.

The specified beans form a path from the ConfigurationMBean to some other object of interest, following each method specified in the getMethodNames array. Starting with the ConfigurationMBean, the system retrieves the next attribute specified in the navigationAttributeNames array, expecting that attribute to be of a type assignable from the next bean in the Object[] array. This continues with the next navigationAttributeName applied to the current object until the end of the lists. Both arrays must be of the same length. At any point, if the attribute specified by the navigationAttributeName array element actually returns an array, then the base type of the array must expose the getName() method which returns a String so the system can select the correct child from the returned array to continue the navigation.

The propertyNames apply to the last object specified in the beans array.

Parameters:
configBean -
navigationAttributeNames -
beans -
propertyNames -
Returns:
Throws:
Exception

isMergeNeeded

boolean isMergeNeeded()

Returns true only if another session might have been activated since the last resolve. It means that there could be some difference which must be merged before activation.

Merge does not necessary mean that there are some conflicts.


Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09