Management of UDDI node states and attributes
We can use the UDDI registry administrative interface to manage the information about a UDDI node and its activation state.
UDDI nodes can be in one of several states, depending on the way the UDDI application is installed. The UddiNode MBean provides four read-only attributes:
- nodeID
- nodeState
- nodeDescription
- nodeApplicationName
The following MBean operations change the state of the UDDI node:
- activateNode
- deactivateNode
- initNode
- nodeID
- The node ID is the unique identifier for a UDDI node. If the UDDI application is installed as a default configuration, the node ID is generated automatically. If the UDDI application is installed manually, the administrator sets the node ID. The node ID must be a valid UDDI key.
String nodeID = uddiNode.getNode(); System.out.println("node ID: " + nodeId);
- nodeState
- The nodeState attribute can have one of the values in the following table:
values. The table lists different nodeState values along
nodeState value English text associated with state node.state.uninitialized Not initialized node.state.initialized Initialized node.state.initPending Initialization pending node.state.initInProgress Initialization in progress node.state.initMigrationPending Migration pending node.state.initMigration Migration in progress node.state.initValueSetCreationPending Value set creation pending node.state.initValueSetCreation Value set creation in progress node.state.activated Activated node.state.deactivated Deactivated node.state.unknown Unknown After a UDDI application is installed as a default configuration,, the UDDI node is in activated state, that is, ready to receive and process UDDI API requests. The node ID, root key generator, and some other properties are generated and we cannot change them.
After a UDDI application is installed manually, for example, because to specify the UDDI node ID and root key generator values, when the UDDI application starts, the UDDI node is in initPending state. In this state, we can update all writable values until you invoke the initNode operation. The initNode operation loads base tModel entities and value set data, and writes all the configuration data to the database for the UDDI node. During initialization, the UDDI node is in initInProgress state. When initialization completes, the state changes momentarily to initialized and settles at activated. At this point, the state can be switched only between the activated and deactivated states, using the deactivateNode and activateNode MBean operations.
Each node state value is a message key that can be looked up in the messages.properties resource bundle. Retrieve the attribute value using the getNodeState method of the UddiNodeProxy class.
- Invoke the getNodeState method:
String nodeStateKey = uddiNode.getNodeState();
- Look up translated text from the resource bundle and produce it as output:
String messages = "com.ibm.uddi.v3.management.messages"; ResourceBundle bundle = ResourceBundle.getBundle(messages,Locale.ENGLISH); String nodeStateText = bundle.getString(nodeStateKey); System.out.println("node state: " + nodeStateText);
- nodeDescription
- We can get the administrator-assigned description for the UDDI node using the getNodeDescription method of the UddiNodeProxy class.
- Invoke the getNodeDescription method and produce output:
String nodeDescription = uddiNode.getNodeDescription(); System.out.println("node description: " + nodeDescription);
- nodeApplicationName
- We can use the nodeApplicationName attribute to discover where the UDDI application that corresponds to the UDDI node is installed. The value is a concatenation of the cell, node, and server names, separated by colons. To retrieve the application location, use the getApplicationId method of the UddiNodeProxy class.
- Invoke the getApplicationId method and produce output:
String nodeApplicationId = uddiNode.getApplicationId(); System.out.println("node application location: " + nodeApplicationId);
- activateNode
- Changes the state of the UDDI node to activated, if the UDDI node is currently deactivated.
- Invoke the activateNode operation:
uddiNode.activateNode();
- deactivateNode
- Changes the state of the UDDI node to deactivated, if the UDDI node is currently activated.
- Invoke the deactivateNode operation:
uddiNode.deactivateNode();
- initNode
- Initializes the UDDI node. When initialization completes, the UDDI node is in the activated state.
- Invoke the initNode operation:
uddiNode.initNode();
Related tasks
Manage the UDDI registry Use the UDDI registry Use administrative programs (JMX)
Management of UDDI node configuration properties Management of UDDI node policies Management of UDDI node tiers Management of UDDI publishers Management of UDDI node value sets