VersioningConfigurationMBean Interface
- public interface VersioningConfigurationMBean
extends 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.
-
All Superinterfaces
-
ConfigurationMBean
, DynamicMBean
, MBeanRegistration
, NotificationBroadcaster
, WebLogicMBean
public static final long |
-
CACHING_STUB_SVUID
- The magic number that is used to generate the serialVersionUID of the generated
MBean Stub (xxxMBean_Stub).
|
public long |
-
getActivationTime (String componentURI)
- Get the activation time for a particular component
|
public 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
|
public String [] |
-
getComponentArray ()
- Get the array of component URIs that belongs to the component group
|
public long |
-
getDeactivationTime (String componentURI)
- Get the deactivation time for a particular component
|
public String |
-
getDefaultComponent ()
- Get the String URI of the default component (or interface) for a particular group
|
public String |
-
getGroup ()
- Get the component group URI for this MBean
|
public boolean |
-
isEnabled (String componentURI)
- Is the component enabled?
|
public boolean |
-
isVersioningEnabled ()
- Is Version Manager enabled and initialized?
|
public void |
-
set (String componentURI, boolean active, long activationDate)
- Set both the activation date and the active flag of a particular component.
|
public void |
-
set (String componentURI, boolean active, long activationDate, long deactivationDate)
- Set both the activation date and the active flag of a particular component.
|
public void |
-
setActivationTime (String componentURI, long activationTime)
- Set the activation time of a particular component , keep the same activation date.
|
public void |
-
setDeactivationTime (String componentURI, long deactivationTime)
- Set the activation time of a particular component , keep the same activation date.
|
public void |
-
setEnabled (String componentURI, boolean active)
- Enable or disable a particular component active attribute
|
public 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 from interface weblogic.management.configuration.ConfigurationMBean |
freezeCurrentValue, getAttributeStringValue, getComments, getNotes, getSetFields, getXml, getXmlConverter, isDefaultedMBean, isPersistenceEnabled, preDeregister, registerConfigMBean, restoreDefaultValue, setComments, setDefaultedMBean, setNotes, setPersistenceEnabled, touch, unRegisterConfigMBean |
CACHING_STUB_SVUID
public 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.
getActivationTime(String) Method
public long getActivationTime(String
componentURI)
throws VersionException
Get the activation time for a particular component
Parameters
-
componentURI
- String URI of component
Returns
- activation time
Exceptions
-
VersionException
getActiveComponent() Method
public 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
Exceptions
-
VersionException
getComponentArray() Method
public String
[] getComponentArray()
throws VersionException
Get the array of component URIs that belongs to the component group
Returns
- String array of component URIs
Exceptions
-
VersionException
getDeactivationTime(String) Method
public long getDeactivationTime(String
componentURI)
throws VersionException
Get the deactivation time for a particular component
Parameters
-
componentURI
- String URI of component
Returns
- deactivation time
Exceptions
-
VersionException
getDefaultComponent() Method
public String
getDefaultComponent()
throws MBeanException
Get the String URI of the default component (or interface) for a particular group
Returns
- String URI of default version
Exceptions
-
MBeanException
getGroup() Method
public String
getGroup()
Get the component group URI for this MBean
Returns
- String URI of the component group
isEnabled(String) Method
public boolean isEnabled(String
componentURI)
throws VersionException
Is the component enabled?
Parameters
-
componentURI
- String URI of component
Returns
- component's enabled flag value
Exceptions
-
VersionException
- if the versioning manager is disabled
or an unexpected error happened.
isVersioningEnabled() Method
public boolean isVersioningEnabled()
Is Version Manager enabled and initialized?
Returns
- true or false
set(String, boolean, long) Method
public 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
Exceptions
-
VersionException
set(String, boolean, long, long) Method
public 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
Exceptions
-
VersionException
setActivationTime(String, long) Method
public 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
Exceptions
-
VersionException
setDeactivationTime(String, long) Method
public 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
Exceptions
-
VersionException
setEnabled(String, boolean) Method
public 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
Exceptions
-
VersionException
validate() Method
public 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
Exceptions
-
VersionException