javax.slee.management
Interface ResourceManagementMBean


public interface ResourceManagementMBean

The ResourceManagementMBean interface defines resource adaptor-related management operations.

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.

Since:
SLEE 1.1

Field Summary
static java.lang.String OBJECT_NAME
          The JMX Object Name string of the SLEE Resource Management MBean, equal to the string "javax.slee.management:name=ResourceManagement".
static java.lang.String RESOURCE_ADAPTOR_ENTITY_STATE_CHANGE_NOTIFICATION_TYPE
          The notification type of ResourceAdaptorEntityStateChange notifications emitted by this MBean.
 
Method Summary
 void activateResourceAdaptorEntity(java.lang.String entityName)
          Activate a resource adaptor entity.
 void bindLinkName(java.lang.String entityName, java.lang.String linkName)
          Bind a resource adaptor entity to a link name.
 void createResourceAdaptorEntity(ResourceAdaptorID id, java.lang.String entityName, ConfigProperties properties)
          Create a resource adaptor entity using the specified configuration properties.
 void deactivateResourceAdaptorEntity(java.lang.String entityName)
          Deactivate a resource adaptor entity.
 SbbID[] getBoundSbbs(java.lang.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(java.lang.String entityName)
          Get the configuration properties for a resource adaptor entity.
 java.lang.String[] getLinkNames()
          Get the set of link names that have been bound to resource adaptor entities.
 java.lang.String[] getLinkNames(java.lang.String entityName)
          Get the set of link names that a particular resource adaptor entity has been bound to.
 ResourceAdaptorID getResourceAdaptor(java.lang.String entityName)
          Get the resource adaptor component identifier from which a resource adaptor entity was created.
 java.lang.String[] getResourceAdaptorEntities()
          Get the set of all resource adaptor entities that have been created in the SLEE.
 java.lang.String[] getResourceAdaptorEntities(ResourceAdaptorEntityState state)
          Get the set of resource adaptor entities that are in a particular state.
 java.lang.String[] getResourceAdaptorEntities(ResourceAdaptorID id)
          Get the set of resource adaptor entities that have been created from a specified resource adaptor component.
 java.lang.String[] getResourceAdaptorEntities(java.lang.String[] linkNames)
          Get an array of resource adaptor entity names which are bound to a corresponding array of link names.
 java.lang.String getResourceAdaptorEntity(java.lang.String linkName)
          Get the resource adaptor entity that a link name is bound to.
 javax.management.ObjectName getResourceUsageMBean(java.lang.String entityName)
          Get the JMX Object Name of a ResourceUsageMBean object for a resource adaptor entity.
 ResourceAdaptorEntityState getState(java.lang.String entityName)
          Get the current state of a resource adaptor entity.
 void removeResourceAdaptorEntity(java.lang.String entityName)
          Remove a resource adaptor entity.
 void unbindLinkName(java.lang.String linkName)
          Remove a link name binding from a resource adaptor entity.
 void updateConfigurationProperties(java.lang.String entityName, ConfigProperties properties)
          Reconfigure a resource adaptor entity with new configuration properties.
 

Field Detail

OBJECT_NAME

static final java.lang.String OBJECT_NAME
The JMX Object Name string of the SLEE Resource Management MBean, equal to the string "javax.slee.management:name=ResourceManagement".

See Also:
Constant Field Values

RESOURCE_ADAPTOR_ENTITY_STATE_CHANGE_NOTIFICATION_TYPE

static final java.lang.String RESOURCE_ADAPTOR_ENTITY_STATE_CHANGE_NOTIFICATION_TYPE
The notification type of ResourceAdaptorEntityStateChange notifications emitted by this MBean. The notification type is equal to the string "javax.slee.management.resourceadaptorentitystatechange".

See Also:
Constant Field Values
Method Detail

getConfigurationProperties

ConfigProperties getConfigurationProperties(ResourceAdaptorID id)
                                            throws java.lang.NullPointerException,
                                                   UnrecognizedResourceAdaptorException,
                                                   ManagementException
Get the configuration properties, and their default values if any, for the specified resource adaptor.

Parameters:
id - the identifier of the resource adaptor.
Returns:
a ConfigProperties object containing the configuration properties of the resource adaptor.
Throws:
java.lang.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.

getConfigurationProperties

ConfigProperties getConfigurationProperties(java.lang.String entityName)
                                            throws java.lang.NullPointerException,
                                                   UnrecognizedResourceAdaptorEntityException,
                                                   ManagementException
Get the configuration properties for a resource adaptor entity.

Parameters:
entityName - the name of the resource adaptor entity.
Returns:
a ConfigProperties object containing the configuration properties of the resource adaptor entity.
Throws:
java.lang.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.

createResourceAdaptorEntity

void createResourceAdaptorEntity(ResourceAdaptorID id,
                                 java.lang.String entityName,
                                 ConfigProperties properties)
                                 throws java.lang.NullPointerException,
                                        InvalidArgumentException,
                                        UnrecognizedResourceAdaptorException,
                                        ResourceAdaptorEntityAlreadyExistsException,
                                        InvalidConfigurationException,
                                        ManagementException
Create a resource adaptor entity using the specified configuration properties. The resource adaptor entity is initialized and enters the 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.

Parameters:
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.
Throws:
java.lang.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.

removeResourceAdaptorEntity

void removeResourceAdaptorEntity(java.lang.String entityName)
                                 throws java.lang.NullPointerException,
                                        UnrecognizedResourceAdaptorEntityException,
                                        InvalidStateException,
                                        DependencyException,
                                        ManagementException
Remove a resource adaptor entity. The resource adaptor entity must be in the ResourceAdaptorEntityState.INACTIVE state.

Parameters:
entityName - the name of the resource adaptor entity.
Throws:
java.lang.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.

updateConfigurationProperties

void updateConfigurationProperties(java.lang.String entityName,
                                   ConfigProperties properties)
                                   throws java.lang.NullPointerException,
                                          UnrecognizedResourceAdaptorEntityException,
                                          InvalidStateException,
                                          InvalidConfigurationException,
                                          ManagementException
Reconfigure a resource adaptor entity with new configuration properties. Properties are specified using a 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.

Parameters:
entityName - the name of the resource adaptor entity.
properties - the values of configuration properties to be updated for the resource adaptor entity.
Throws:
java.lang.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.

getResourceAdaptor

ResourceAdaptorID getResourceAdaptor(java.lang.String entityName)
                                     throws java.lang.NullPointerException,
                                            UnrecognizedResourceAdaptorEntityException,
                                            ManagementException
Get the resource adaptor component identifier from which a resource adaptor entity was created.

Parameters:
entityName - the name of the resource adaptor entity.
Returns:
the identifier of the resource adaptor component the resource adaptor entity was created from.
Throws:
java.lang.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.

activateResourceAdaptorEntity

void activateResourceAdaptorEntity(java.lang.String entityName)
                                   throws java.lang.NullPointerException,
                                          UnrecognizedResourceAdaptorEntityException,
                                          InvalidStateException,
                                          ManagementException
Activate a resource adaptor entity. The resource adaptor entity must be in the ResourceAdaptorEntityState.INACTIVE state, and transitions to the ResourceAdaptorEntityState.ACTIVE state during this method invocation.

Parameters:
entityName - the name of the resource adaptor entity.
Throws:
java.lang.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.

deactivateResourceAdaptorEntity

void deactivateResourceAdaptorEntity(java.lang.String entityName)
                                     throws java.lang.NullPointerException,
                                            UnrecognizedResourceAdaptorEntityException,
                                            InvalidStateException,
                                            ManagementException
Deactivate a resource adaptor entity. The resource adaptor entity must be in the 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.

Parameters:
entityName - the name of the resource adaptor entity.
Throws:
java.lang.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.

getState

ResourceAdaptorEntityState getState(java.lang.String entityName)
                                    throws java.lang.NullPointerException,
                                           UnrecognizedResourceAdaptorEntityException,
                                           ManagementException
Get the current state of a resource adaptor entity.

Parameters:
entityName - the name of the resource adaptor entity.
Returns:
the current state of the resource adaptor entity.
Throws:
java.lang.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.

getResourceAdaptorEntities

java.lang.String[] getResourceAdaptorEntities()
                                              throws ManagementException
Get the set of all resource adaptor entities that have been created in the SLEE.

Returns:
an array of resource adaptor entity identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getResourceAdaptorEntities

java.lang.String[] getResourceAdaptorEntities(ResourceAdaptorID id)
                                              throws java.lang.NullPointerException,
                                                     UnrecognizedResourceAdaptorException,
                                                     ManagementException
Get the set of resource adaptor entities that have been created from a specified resource adaptor component.

Parameters:
id - the identifier of the resource adaptor.
Returns:
an array of strings identifying the resource adaptor entites that have been created from the resource adaptor definition.
Throws:
java.lang.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.

getResourceAdaptorEntities

java.lang.String[] getResourceAdaptorEntities(ResourceAdaptorEntityState state)
                                              throws java.lang.NullPointerException,
                                                     ManagementException
Get the set of resource adaptor entities that are in a particular state.

Parameters:
state - the required state.
Returns:
an array of strings identifying the resource adaptor entities that are in the specified state.
Throws:
java.lang.NullPointerException - if state is null.
ManagementException - if the identifiers could not be obtained due to a system-level failure.

bindLinkName

void bindLinkName(java.lang.String entityName,
                  java.lang.String linkName)
                  throws java.lang.NullPointerException,
                         InvalidArgumentException,
                         UnrecognizedResourceAdaptorEntityException,
                         LinkNameAlreadyBoundException,
                         ManagementException
Bind a resource adaptor entity to a link name.

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.

Parameters:
entityName - the name of the resource adaptor entity.
linkName - the link name. The name must be unique within the scope of the SLEE.
Throws:
java.lang.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.

unbindLinkName

void unbindLinkName(java.lang.String linkName)
                    throws java.lang.NullPointerException,
                           UnrecognizedLinkNameException,
                           DependencyException,
                           ManagementException
Remove a link name binding from a resource adaptor entity.

Parameters:
linkName - the link name.
Throws:
java.lang.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.

getLinkNames

java.lang.String[] getLinkNames()
                                throws ManagementException
Get the set of link names that have been bound to resource adaptor entities.

Returns:
an array of link names.
Throws:
ManagementException - if the link names could not be obtained due to a system-level failure.

getLinkNames

java.lang.String[] getLinkNames(java.lang.String entityName)
                                throws java.lang.NullPointerException,
                                       UnrecognizedResourceAdaptorEntityException,
                                       ManagementException
Get the set of link names that a particular resource adaptor entity has been bound to.

Parameters:
entityName - the name of the resource adaptor entity.
Returns:
an array of link names identifying the link names that the resource adaptor entity is bound to.
Throws:
java.lang.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.

getBoundSbbs

SbbID[] getBoundSbbs(java.lang.String linkName)
                     throws java.lang.NullPointerException,
                            UnrecognizedLinkNameException,
                            ManagementException
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.

Parameters:
linkName - the link name.
Returns:
an array of SBB component identifiers identifying the SBBs that are bound to the link name.
Throws:
java.lang.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.

getResourceAdaptorEntity

java.lang.String getResourceAdaptorEntity(java.lang.String linkName)
                                          throws java.lang.NullPointerException,
                                                 UnrecognizedLinkNameException,
                                                 ManagementException
Get the resource adaptor entity that a link name is bound to.

Parameters:
linkName - the link name.
Returns:
the identifier of the resource adaptor entity that is bound to the link name.
Throws:
java.lang.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.

getResourceAdaptorEntities

java.lang.String[] getResourceAdaptorEntities(java.lang.String[] linkNames)
                                              throws java.lang.NullPointerException,
                                                     ManagementException
Get an array of resource adaptor entity names which are bound to a corresponding array of link names.

Parameters:
linkNames - an array of link names.
Returns:
an array of resource adaptor entity identifiers. This array will be the same length as the supplied array, and if 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.
Throws:
java.lang.NullPointerException - if linkNames is null.
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getResourceUsageMBean

javax.management.ObjectName getResourceUsageMBean(java.lang.String entityName)
                                                  throws java.lang.NullPointerException,
                                                         UnrecognizedResourceAdaptorEntityException,
                                                         InvalidArgumentException,
                                                         ManagementException
Get the JMX Object Name of a ResourceUsageMBean object for a resource adaptor entity.

The JMX Object name of the Resource Usage MBean is composed of at least:

Parameters:
entityName - the name of the resource adaptor entity.
Returns:
the Object Name of a ResourceUsageMBean object for the specified resource adaptor entity.
Throws:
java.lang.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.


Copyright © 2009. All Rights Reserved.