com.bea.wli.management.configuration
Interface VersioningConfigurationMBean

All Superinterfaces:
weblogic.management.configuration.ConfigurationMBean, weblogic.descriptor.DescriptorBean, javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, weblogic.descriptor.SettableBean, weblogic.management.WebLogicMBean

public interface VersioningConfigurationMBean
extends weblogic.management.configuration.ConfigurationMBean

Configuration MBean interface for Processes' Versioning.
Declare versioning information lookups and configuration settings at run-time.

Versioned processes are defined by:
  • A Component group URI : public URI that is used as an alias to invoke the current active version. A Component group URI does not correspond to any physical process file.
  • A set of component URIs: all the alternate versions that can be used for the group URI. Each component URI corresponds to an actual physical Process file.
  • A default component URI: Component URI of the version used as reference for all versions of a group. The default component defines the minimum set of operations and callbacks a version must implement in order to be a valid alternate version for a group.

    There is one instance of VersioningConfigurationMBean per versioned group. That is, each versioning MBean is identified by its service's group URI that can be accessed with :
    getGroup()

    You can get the current active component for a this group by calling:

    String activeURI = getActiveComponent ()
    .
    For instance, the resulting activeURI could be "/webappName/relativePath/process_v1.jpd" which would be one of the component URI registered for this group.

    Additionally, this MBean can access and set the attributes of each component as well as the group's attributes such as:

  • the interface URI of the group
  • the set of component URIs that belongs to the group
  • the active flag of a component
  • the activation date of a component
  • the deactivation date of a component

  • Once you modified the configuration, you may want to check that it is still valid. Run the validate() method to ensure that the modifications did not break the versioning integrity.

    Note that this MBean does not allow to add or remove a version component.


    Field Summary
    static long CACHING_STUB_SVUID
              The magic number that is used to generate the serialVersionUID of the generated MBean Stub (xxxMBean_Stub).
     
    Fields inherited from interface weblogic.management.configuration.ConfigurationMBean
    DEFAULT_EMPTY_BYTE_ARRAY
     
    Method Summary
     long getActivationTime(String componentURI)
              Get the activation time for a particular component
     String getActiveComponent()
              Get the current runtime active component for this MBean's group The current active component for a group is selected as follows: its active flag is "true" it has the most recent activation date among all the active components in its group it complies to the interface defined by the default component of the group
     String[] getComponentArray()
              Get the array of component URIs that belongs to the component group
     long getDeactivationTime(String componentURI)
              Get the deactivation time for a particular component
     String getDefaultComponent()
              Get the String URI of the default component (or interface) for a particular group
     String getGroup()
              Get the component group URI for this MBean
     boolean isEnabled(String componentURI)
              Is the component enabled?
     boolean isVersioningEnabled()
              Is Version Manager enabled and initialized?
     void set(String componentURI, boolean active, long activationDate)
              Set both the activation date and the active flag of a particular component.
     void set(String componentURI, boolean active, long activationDate, long deactivationDate)
              Set both the activation date and the active flag of a particular component.
     void setActivationTime(String componentURI, long activationTime)
              Set the activation time of a particular component , keep the same activation date.
     void setDeactivationTime(String componentURI, long deactivationTime)
              Set the activation time of a particular component , keep the same activation date.
     void setEnabled(String componentURI, boolean active)
              Enable or disable a particular component active attribute
     String[] validate()
              Validate the current Version configuration, keep the same active flag A configuration is valid if there is only one currently active version or if there are multiple active versions and each of them has distinct activation dates.
     
    Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
    freezeCurrentValue, getComments, getName, getNotes, isDefaultedMBean, isPersistenceEnabled, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, touch, unSet
     
    Methods inherited from interface weblogic.management.WebLogicMBean
    getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent
     
    Methods inherited from interface javax.management.DynamicMBean
    getAttribute, getAttributes, invoke, setAttribute, setAttributes
     
    Methods inherited from interface javax.management.MBeanRegistration
    postDeregister, postRegister, preDeregister, preRegister
     
    Methods inherited from interface javax.management.NotificationBroadcaster
    addNotificationListener, getNotificationInfo, removeNotificationListener
     
    Methods inherited from interface weblogic.descriptor.DescriptorBean
    addBeanUpdateListener, addPropertyChangeListener, createChildCopy, createChildCopyIncludingObsolete, getDescriptor, getParentBean, isEditable, removeBeanUpdateListener, removePropertyChangeListener
     

    Field Detail

    CACHING_STUB_SVUID

    static final long CACHING_STUB_SVUID
    The magic number that is used to generate the serialVersionUID of the generated MBean Stub (xxxMBean_Stub). You must change this value whenever you make one of the changes to this interface:

    - remove an existing method.
    - change the signature of an existing "getter" or "setter" method.
    - change the signature of an existing "boolean getter", i.e, "boolean isEnabled()"

    Otherwise you don't need to change this value. For instance you can add new methods, or you can change the signature of methods that don't start with "get", "set" or "is". If you are in doubt then change the SVUID. It is a good idea to increment this value when changing.

    See Also:
    Constant Field Values
    Method Detail

    isVersioningEnabled

    boolean isVersioningEnabled()
    Is Version Manager enabled and initialized?

    Returns:
    true or false

    getGroup

    String getGroup()
    Get the component group URI for this MBean

    Returns:
    String URI of the component group

    getActiveComponent

    String getActiveComponent()
                              throws VersionException
    Get the current runtime active component for this MBean's group The current active component for a group is selected as follows:
  • its active flag is "true"
  • it has the most recent activation date among all the active components in its group
  • it complies to the interface defined by the default component of the group
  • Returns:
    String URI of current active component or null if none is currently active
    Throws:
    VersionException - if the versioning manager is disabled or an unexpected error happened.

    getComponentArray

    String[] getComponentArray()
                               throws VersionException
    Get the array of component URIs that belongs to the component group

    Returns:
    String array of component URIs
    Throws:
    VersionException - if the versioning manager is disabled or an unexpected error happened.

    getActivationTime

    long getActivationTime(String componentURI)
                           throws VersionException
    Get the activation time for a particular component

    Parameters:
    componentURI - String URI of component
    Returns:
    activation time
    Throws:
    VersionException - if the versioning manager is disabled or an unexpected error happened.

    getDeactivationTime

    long getDeactivationTime(String componentURI)
                             throws VersionException
    Get the deactivation time for a particular component

    Parameters:
    componentURI - String URI of component
    Returns:
    deactivation time
    Throws:
    VersionException - if the versioning manager is disabled or an unexpected error happened.

    isEnabled

    boolean isEnabled(String componentURI)
                      throws VersionException
    Is the component enabled?

    Parameters:
    componentURI - String URI of component
    Returns:
    component's enabled flag value
    Throws:
    VersionException - if the versioning manager is disabled or an unexpected error happened.

    getDefaultComponent

    String getDefaultComponent()
                               throws javax.management.MBeanException
    Get the String URI of the default component (or interface) for a particular group

    Returns:
    String URI of default version
    Throws:
    javax.management.MBeanException

    set

    void set(String componentURI,
             boolean active,
             long activationDate)
             throws VersionException
    Set both the activation date and the active flag of a particular component. set the deactivation date to default -1 value, which means that the component has no deactivation date)

    Parameters:
    componentURI - String URI of this component
    active - toggle activation value
    activationDate - time of activation in seconds since 01.01.1970 00:00.00 GMT
    Throws:
    VersionException - if the change causes more than one version to be active at the same time or the versioning manager is disabled or an unexpected error happened.

    set

    void set(String componentURI,
             boolean active,
             long activationDate,
             long deactivationDate)
             throws VersionException
    Set both the activation date and the active flag of a particular component.

    Parameters:
    componentURI - String URI of this component
    active - toggle activation value
    activationDate - time of activation in seconds since 01.01.1970 00:00.00 GMT
    deactivationDate - time of deactivation in seconds since 01.01.1970 00:00.00 GMT
    Throws:
    VersionException - if the change causes more than one version to be active at the same time or the versioning manager is disabled or an unexpected error happened.

    setEnabled

    void setEnabled(String componentURI,
                    boolean active)
                    throws VersionException
    Enable or disable a particular component active attribute

    Parameters:
    componentURI - String URI of this component
    active - toggle activation value
    Throws:
    VersionException - if the change causes more than one version to be active at the same time or an unexpected error happened.

    setActivationTime

    void setActivationTime(String componentURI,
                           long activationTime)
                           throws VersionException
    Set the activation time of a particular component , keep the same activation date.

    Parameters:
    componentURI - String URI of component
    activationTime - time of activation in seconds since 01.01.1970 00:00.00 GMT
    Throws:
    VersionException - if if the change causes more than one version to be active at the same time or the versioning manager is disabled or an unexpected error happened.

    setDeactivationTime

    void setDeactivationTime(String componentURI,
                             long deactivationTime)
                             throws VersionException
    Set the activation time of a particular component , keep the same activation date.

    Parameters:
    componentURI - String URI of component
    deactivationTime - time of deactivation in seconds since 01.01.1970 00:00.00 GMT
    Throws:
    VersionException - if if the change causes more than one version to be active at the same time or the versioning manager is disabled or an unexpected error happened.

    validate

    String[] validate()
                      throws VersionException
    Validate the current Version configuration, keep the same active flag A configuration is valid if there is only one currently active version or if there are multiple active versions and each of them has distinct activation dates.

    Returns:
    String array of diagnostics if there are errors or empty array if configuration is valid
    Throws:
    VersionException - if the versioning manager is disabled or an unexpected error happened.