public interface ResourceManagementMBean
Using the ResourceManagementMBean a management client may create, remove, activate and deactivate resource adaptor entities, configure resource adaptor properties, and manage resource adaptor entity link names.
The JMX Object Name of a ResourceManagementMBean
object is specified by
the OBJECT_NAME
constant. The Object Name can also be obtained by a
management client via the SleeManagementMBean.getResourceManagementMBean()
method.
Modifier and Type | Field and Description |
---|---|
static String |
OBJECT_NAME
The JMX Object Name string of the SLEE Resource Management MBean, equal to the string
"javax.slee.management:name=ResourceManagement".
|
static String |
RESOURCE_ADAPTOR_ENTITY_STATE_CHANGE_NOTIFICATION_TYPE
The notification type of
ResourceAdaptorEntityStateChange
notifications emitted by this MBean. |
Modifier and Type | Method and Description |
---|---|
void |
activateResourceAdaptorEntity(String entityName)
Activate a resource adaptor entity.
|
void |
bindLinkName(String entityName,
String linkName)
Bind a resource adaptor entity to a link name.
|
void |
createResourceAdaptorEntity(ResourceAdaptorID id,
String entityName,
ConfigProperties properties)
Create a resource adaptor entity using the specified configuration properties.
|
void |
deactivateResourceAdaptorEntity(String entityName)
Deactivate a resource adaptor entity.
|
SbbID[] |
getBoundSbbs(String linkName)
Get the set of SBB component identifiers that identify the SBBs that are bound
to the specified link name by way of a
resource-adaptor-entity-link
element in their deployment descriptor. |
ConfigProperties |
getConfigurationProperties(ResourceAdaptorID id)
Get the configuration properties, and their default values if any, for the specified
resource adaptor.
|
ConfigProperties |
getConfigurationProperties(String entityName)
Get the configuration properties for a resource adaptor entity.
|
String[] |
getLinkNames()
Get the set of link names that have been bound to resource adaptor entities.
|
String[] |
getLinkNames(String entityName)
Get the set of link names that a particular resource adaptor entity has been
bound to.
|
ResourceAdaptorID |
getResourceAdaptor(String entityName)
Get the resource adaptor component identifier from which a resource adaptor entity was
created.
|
String[] |
getResourceAdaptorEntities()
Get the set of all resource adaptor entities that have been created in the SLEE.
|
String[] |
getResourceAdaptorEntities(ResourceAdaptorEntityState state)
Get the set of resource adaptor entities that are in a particular state.
|
String[] |
getResourceAdaptorEntities(ResourceAdaptorID id)
Get the set of resource adaptor entities that have been created from a specified
resource adaptor component.
|
String[] |
getResourceAdaptorEntities(String[] linkNames)
Get an array of resource adaptor entity names which are bound to a corresponding
array of link names.
|
String |
getResourceAdaptorEntity(String linkName)
Get the resource adaptor entity that a link name is bound to.
|
ObjectName |
getResourceUsageMBean(String entityName)
Get the JMX Object Name of a
ResourceUsageMBean object for a resource
adaptor entity. |
ResourceAdaptorEntityState |
getState(String entityName)
Get the current state of a resource adaptor entity.
|
void |
removeResourceAdaptorEntity(String entityName)
Remove a resource adaptor entity.
|
void |
unbindLinkName(String linkName)
Remove a link name binding from a resource adaptor entity.
|
void |
updateConfigurationProperties(String entityName,
ConfigProperties properties)
Reconfigure a resource adaptor entity with new configuration properties.
|
static final String OBJECT_NAME
static final String RESOURCE_ADAPTOR_ENTITY_STATE_CHANGE_NOTIFICATION_TYPE
ResourceAdaptorEntityStateChange
notifications emitted by this MBean. The notification type is equal to the
string "javax.slee.management.resourceadaptorentitystatechange
".ConfigProperties getConfigurationProperties(ResourceAdaptorID id) throws NullPointerException, UnrecognizedResourceAdaptorException, ManagementException
id
- the identifier of the resource adaptor.ConfigProperties
object containing the configuration properties of
the resource adaptor.NullPointerException
- if id
is null
.UnrecognizedResourceAdaptorException
- if id
is not a recognizable
ResourceAdaptorID
object for the SLEE or it does not correspond
with a resource adaptor installed in the SLEE.ManagementException
- if the configuration properties could not be obtained
due to a system-level failure.ConfigProperties getConfigurationProperties(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, ManagementException
entityName
- the name of the resource adaptor entity.ConfigProperties
object containing the configuration properties of
the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.ManagementException
- if the configuration properties could not be obtained
due to a system-level failure.void createResourceAdaptorEntity(ResourceAdaptorID id, String entityName, ConfigProperties properties) throws NullPointerException, InvalidArgumentException, UnrecognizedResourceAdaptorException, ResourceAdaptorEntityAlreadyExistsException, InvalidConfigurationException, ManagementException
ResourceAdaptorEntityState.INACTIVE
state before this method returns.
Properties are specified using a ConfigProperties
object. Properties for the
resource adaptor that the resource adaptor entity is to be created from can be obtained
using the getConfigurationProperties
method. The management client must ensure that all properties included in the
ConfigProperties
object have a non-null value before passing it to this method.
The raVerifyConfiguration
method is invoked on a resource adaptor object to test validity of the configuration
properties for the Resource Adaptor.
id
- the identifier of the resource adaptor the resource adaptor entity
should be constructed from.entityName
- the name of the resource adaptor entity to create.properties
- the configuration properties for the resource adaptor entity.NullPointerException
- if any argument is null
.InvalidArgumentException
- if entityName
is zero-length.UnrecognizedResourceAdaptorException
- if id
is not a recognizable
ResourceAdaptorID
object for the SLEE or it does not correspond
with a resource adaptor installed in the SLEE.ResourceAdaptorEntityAlreadyExistsException
- if a resource adaptor entity with
the given name already exists.InvalidConfigurationException
- if one or more of the configuration properties
has a null
value, or if the configuration properties were not valid
for the Resource Adaptor as determined by the
raVerifyConfiguration
method.ManagementException
- if the resource adaptor entity could not be created
due to a system-level failure.void removeResourceAdaptorEntity(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, InvalidStateException, DependencyException, ManagementException
ResourceAdaptorEntityState.INACTIVE
state.entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.InvalidStateException
- if the resource adaptor entity is not in the
ResourceAdaptorEntityState.INACTIVE
state.DependencyException
- if the resource adaptor entity is bound to one or
more link names.ManagementException
- if the resource adaptor entity could not be removed
due to a system-level failure.void updateConfigurationProperties(String entityName, ConfigProperties properties) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, InvalidStateException, InvalidConfigurationException, ManagementException
ConfigProperties
object.
Only properties that need updating need to be included in the ConfigProperties
object.
The management client must ensure that all properties included in the ConfigProperties
object have a non-null value before passing it to this method.
A Resource Adaptor may elect to support reconfiguration when resource adaptor objects representing its resource adaptor entities are active using the supports-active-reconfiguration attribute of the <resource-adaptor-class> deployment descriptor element. If the value of the supports-active-reconfiguration attribute is False, this method may only be invoked to reconfigure a resource adaptor entity when it is in the Inactive state, or when the SLEE is in the Stopped state. If the value of the supports-active-reconfiguration attribute is True, then a resource adaptor entity may be reconfigured when it, and the SLEE, are in any state, i.e. reconfiguration is possible while the resource adaptor entity is creating activities and firing events in the SLEE.
The raVerifyConfiguration
method is invoked on a resource adaptor object to test validity of configuration
properties specified as an argument to this method.
entityName
- the name of the resource adaptor entity.properties
- the values of configuration properties to be updated for the resource adaptor entity.NullPointerException
- if either argument is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.InvalidStateException
- if the Resource Adaptor's deployment descriptor
specified that it did not support active reconfiguration and either the
resource adaptor entity is not in the Inactive state or the SLEE is not in
the Stopped state.InvalidConfigurationException
- if one or more of the configuration properties
has a null
value, or if the configuration properties were not valid
for the Resource Adaptor as determined by the
raVerifyConfiguration
method.ManagementException
- if the resource adaptor entity configuration properties
could not be updated due to a system-level failure.ResourceAdaptorID getResourceAdaptor(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, ManagementException
entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.ManagementException
- if the resource adaptor component identifier could not
be obtained due to a system-level failure.void activateResourceAdaptorEntity(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, InvalidStateException, ManagementException
ResourceAdaptorEntityState.INACTIVE
state, and transitions to the
ResourceAdaptorEntityState.ACTIVE
state during this method invocation.entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.InvalidStateException
- if the resource adaptor entity is not in the
ResourceAdaptorEntityState.INACTIVE
state.ManagementException
- if the resource adaptor entity could not be activated
due to a system-level failure.void deactivateResourceAdaptorEntity(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, InvalidStateException, ManagementException
ResourceAdaptorEntityState.ACTIVE
state, and transitions to the
ResourceAdaptorEntityState.STOPPING
state during this method invocation.
The resource adaptor entity spontaneously returns to the
ResourceAdaptorEntityState.INACTIVE
state once all activities created by the
resource adaptor entity have ended.entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.InvalidStateException
- if the resource adaptor entity is not in the
ResourceAdaptorEntityState.ACTIVE
state.ManagementException
- if the resource adaptor entity could not be deactivated
due to a system-level failure.ResourceAdaptorEntityState getState(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, ManagementException
entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.ManagementException
- if the state of the resource adaptor entity could not
be obtained due to a system-level failure.String[] getResourceAdaptorEntities() throws ManagementException
ManagementException
- if the identifiers could not be obtained due to a
system-level failure.String[] getResourceAdaptorEntities(ResourceAdaptorID id) throws NullPointerException, UnrecognizedResourceAdaptorException, ManagementException
id
- the identifier of the resource adaptor.NullPointerException
- if id
is null
.UnrecognizedResourceAdaptorException
- if id
is not a recognizable
ResourceAdaptorID
object for the SLEE or it does not correspond
with a resource adaptor installed in the SLEE.ManagementException
- if the identifiers could not be obtained due to a
system-level failure.String[] getResourceAdaptorEntities(ResourceAdaptorEntityState state) throws NullPointerException, ManagementException
state
- the required state.NullPointerException
- if state
is null
.ManagementException
- if the identifiers could not be obtained due to a
system-level failure.void bindLinkName(String entityName, String linkName) throws NullPointerException, InvalidArgumentException, UnrecognizedResourceAdaptorEntityException, LinkNameAlreadyBoundException, ManagementException
Link names are used to establish the bindings between SBBs and resource adaptor entities. If an SBB requires a resource adaptor entity of a particular resource adaptor type to be bound into its JNDI environment, it specifies the required resource adaptor type and a link name in its deployment descriptor. A resource adaptor entity of the correct resource adaptor type must be bound to that link name before the SBB can be deployed.
Only resource adaptor entities of resource adaptor types that define a resource adaptor interface may be bound to link names.
entityName
- the name of the resource adaptor entity.linkName
- the link name. The name must be unique within the scope of the SLEE.NullPointerException
- if either argument is null
.InvalidArgumentException
- if linkName
is zero-length, or if
the resource adaptor type of the resource adaptor entity does not define
a resource adaptor interface.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.LinkNameAlreadyBoundException
- if the link name has already be bound.ManagementException
- if the link name could not be bound due to a
system-level failure.void unbindLinkName(String linkName) throws NullPointerException, UnrecognizedLinkNameException, DependencyException, ManagementException
linkName
- the link name.NullPointerException
- if linkName
is null
.UnrecognizedLinkNameException
- if linkName
has not been bound
to a resource adaptor entity.DependencyException
- if the link name is in use by one or more deployed SBBs.ManagementException
- if the link name could not be unbound due to a
system-level failure.String[] getLinkNames() throws ManagementException
ManagementException
- if the link names could not be obtained due to a
system-level failure.String[] getLinkNames(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, ManagementException
entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.ManagementException
- if the link names could not be obtained due to a
system-level failure.SbbID[] getBoundSbbs(String linkName) throws NullPointerException, UnrecognizedLinkNameException, ManagementException
resource-adaptor-entity-link
element in their deployment descriptor.linkName
- the link name.NullPointerException
- if linkName
is null
.UnrecognizedLinkNameException
- if linkName
has not been bound
to a resource adaptor entity.ManagementException
- if the SBB component identifiers could not be obtained
due to a system-level failure.String getResourceAdaptorEntity(String linkName) throws NullPointerException, UnrecognizedLinkNameException, ManagementException
linkName
- the link name.NullPointerException
- if linkName
is null
.UnrecognizedLinkNameException
- if linkName
has not been bound
to a resource adaptor entity.ManagementException
- if the identifier could not be obtained due to a
system-level failure.String[] getResourceAdaptorEntities(String[] linkNames) throws NullPointerException, ManagementException
linkNames
- an array of link names.entities == getResourceAdaptorEntities(linkNames)
then entities[i] == getResourceAdaptorEntity(linkNames[i]). Any unrecognized
link name present in linkNames
results in a null
value
at the corresponding array index in this array.NullPointerException
- if linkNames
is null
.ManagementException
- if the identifiers could not be obtained due to a
system-level failure.ObjectName getResourceUsageMBean(String entityName) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, InvalidArgumentException, ManagementException
ResourceUsageMBean
object for a resource
adaptor entity.
The JMX Object name of the Resource Usage MBean is composed of at least:
base name
which specifies the
domain and type of the MBean
ResourceUsageMBean.RESOURCE_ADAPTOR_ENTITY_NAME_KEY
property,
with a value equal to entityName
entityName
- the name of the resource adaptor entity.ResourceUsageMBean
object for the
specified resource adaptor entity.NullPointerException
- if entityName
is null
.UnrecognizedResourceAdaptorEntityException
- if entityName
does not correspond with a resource adaptor entity existing in the SLEE.InvalidArgumentException
- if the resource adaptor component that the
specified resource adaptor entity was created from does not define a usage
parameters interface.ManagementException
- if the Object Name could not be obtained due to a
system-level failure.