Previous Contents Index DocHome Next |
iPlanet Process Manager Programming Guide Version 6.0 Service Pack 2 |
Chapter 4 Cluster Management
This chapter discusses the Java classes used for performing cluster administration tasks. This chapter has the following sections:Note: You can find all the necessary classes in the pm60classes.jar file. If you have installed the Process Manager Builder, you can find this jar file in the directory builder-root\support\sdk. You may also be able to find it on the CD.
Introduction
A Process Manager cluster contains the following components:
a corporate user LDAP directory service
When deploying an application from Process Builder, application developers must identify the cluster on which to deploy it. All applications in a cluster share the same common database and directories. They access the same Directory Server for their process definitions and they use the same set of cross-application tables in the database, as well as the same corporate users and groups directory.a configuration LDAP directory service that stores the application definitions
a relational database for user data
Using the Process Administrator interface, you can interactively modify a cluster.
You can build Java applications that programmatically perform Process Manager cluster administration tasks. Process Manager has one cluster manager bean, IPMClusterManager. For each separate cluster, there is an IPMCluster bean.
You can use the cluster manager bean to perform administrative tasks such as creating, deleting, joining and unjoining clusters. You can also use the cluster manager bean to get handles to individual clusters beans.
You can use the cluster bean to change properties of the cluster, to access and write to cluster logs, and to retrieve information about the cluster such as getting installed applications, getting path information, getting the finder and getting the deployment manager.
Given an individual cluster bean, you can get individual application beans. Given an application bean, you can access any process instance or work item so long as you have the key, such as the process instance ID.
For details of IPMClusterManager and IPMCluster beans see:
In Process Manager 6.0, there is only one cluster, but in future releases there may be multiple clusters.
Clusters have properties. These are represented as IPMClusterProperty objects. Many of the methods for working with clusters take IPMClusterProperty objects as arguments. To create cluster property objects, you use IPMClusterPropertyFactory . For details see:
At the end of this chapter, there is a coded example of creating a cluster.
Code Samples
IPMClusterManager
The IPMClusterManager bean can be thought as a manager of all the cluster beans in the application server instance. In Process Manager 6.0, there is just one cluster, which is the default cluster. The IPMClusterManager manages the default cluster bean. But in the future, when Process Manager supports multiple clusters, the IPMClusterManager bean will manage all the different clusters for that application server instance.The following code shows how to access the cluster manager:
The IPMClusterManager bean is a stateless session bean that has methods for creating, joining, accessing, unjoining and deleting clusters, and checking LDAP and database connections.
IPMCluster
IPMCluster objects represent individual clusters. For operations such as creating, deleting, joining and unjoining clusters, you call methods on the cluster manager class, IPMClusterManager, rather than calling methods on the cluster itself.To get access to an IPMCluster method, call the getCluster() method on the IPMClusterManager as illustrated in the following code sample:
The IPMCluster bean has methods for changing cluster properties, accessing logs and retrieving information about the cluster.
For details for the IPMCluster bean methods, see the javadocs, which can be found in the support\sdk\docs directory of the Process Manager Builder installation.
IPMClusterProperty
The IPMClusterProperty interface is used in various cluster bean APIs. It is used to set and get cluster properties.When creating an IPMCluster, you first need to create an IPMClusterProperty and then use the setValue() method to set the cluster properties. Table 4-1 lists the cluster properties that must be set when creating a cluster. Table 4-2 lists cluster properties that specify URLs for accessing various Process Manager components.
To create an IPMClusterProperty, use the create() method on IPMClusterPropertyFactory as follows:
IPMClusterProperty prop1 = PMClusterPropertyFactory.create ( ) ;
To get the existing IPMClusterProperty for a cluster, call getClusterProperty() on the cluster, as follows:
IPMClusterProperty myProp = myCluster.getClusterProperty();
Table 4-1    Cluster properties
All properties are public static int
Cluster and configuration properties
Corporate directory properties
Database properties
General properties
Table 4-2    URL Properties
All properties are public static int
Other pre-defined variables are listed in Table 4-4.
Table 4-4    Other static int variables
These are used as an argument to the getLog() method on IPMCluster to specify what kind of log to retrieve.
Getting and Setting Property Values
To retrieve or set properties, use the methods:For on the property value settings, see the javadocs, which can be found in the support\sdk\docs directory of the Process Manager Builder installation.
PMClusterPropertyFactory
The purpose of this class is to create new IPMClusterProperty objects, which contain the properties for a cluster.
// Create a PMClusterProperty object
IPMClusterProperty prop1 = PMClusterPropertyFactory.create ( ) ;
Code Samples
This section presents the following code samples:
Mount the Cluster Manager and Get the Default Cluster
Mount the Cluster Manager and Get the Default Cluster
This code sample gets the cluster manager and the default cluster.
Create a Cluster
This code sample creates a new cluster, which overwrites the existing one in Process Manager 6.0, since only one cluster is supported at a time.
Get and Set Cluster Properties
This code sample gets and sets cluster properties.
Previous Contents Index DocHome Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated March 13, 2001