org.objectweb.jonas.management.cluster
Class JkCluster
java.lang.Object
org.objectweb.jonas.management.cluster.BaseCluster
org.objectweb.jonas.management.cluster.JkCluster
- All Implemented Interfaces:
- BaseClusterMBean, JkClusterMBean
public class JkCluster
- extends BaseCluster
- implements JkClusterMBean
JkCluster are used for Web level load balancing
- Author:
- Adriana Danes, Philippe Durieux
Fields inherited from class org.objectweb.jonas.management.cluster.BaseCluster |
cf, dm, jmx, logger, members, name, objectName, state, STATE_DOWN, STATE_FAILED, STATE_INIT, STATE_PARTIALLY_DOWN, STATE_PARTIALLY_FAILED, STATE_PARTIALLY_UP, STATE_UNKNOWN, STATE_UP |
Constructor Summary |
JkCluster(JkClusterFactory cf)
Web level loadbalancing cluster constructor
Lookup for configuration file in JONAS_BASE/conf
This is the "workers.properties" file from TOMCAT. |
Methods inherited from class org.objectweb.jonas.management.cluster.BaseCluster |
addMember, addServer, addServer, deployModule, getMembers, getName, getNbMembers, getObjectName, getServer, getServerProxy, getServerProxyList, getState, removeServer, setName, startit, stopit, undeployModule, uploadDeployModule, uploadFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas.management.cluster.BaseClusterMBean |
addServer, addServer, deployModule, getMembers, getName, getNbMembers, getState, removeServer, startit, stopit, undeployModule, uploadDeployModule, uploadFile |
JkCluster
public JkCluster(JkClusterFactory cf)
throws javax.management.JMException
- Web level loadbalancing cluster constructor
Lookup for configuration file in JONAS_BASE/conf
This is the "workers.properties" file from TOMCAT.
- Parameters:
cf
- ClusterFactory
- Throws:
javax.management.JMException
- could not create MBean instance
createClusterMember
public ClusterMember createClusterMember(java.lang.String svname,
ServerProxy proxy)
- Description copied from class:
BaseCluster
- Create a new ClusterMember. Depends on the underlaying class.
- Specified by:
createClusterMember
in class BaseCluster
getType
public java.lang.String getType()
- Specified by:
getType
in class BaseCluster
- Returns:
- The String type to be put in the ObjectName
addWorker
public boolean addWorker(java.lang.String workerName,
int workerPort,
ServerProxy proxy)
- Add a Worker to the list of the JkCluster
It should be known in workers.properties
Make link between the member and the ServerProxy.
- Parameters:
workerName
- the worker nameworkerPort
- the worker portproxy
- The ServerProxy related object.
- Returns:
- True if correctly added in the List.
getBalancedWorkers
public java.lang.String[] getBalancedWorkers()
- Specified by:
getBalancedWorkers
in interface JkClusterMBean
- Returns:
- The list of the load balancer workers' name
isStickySession
public boolean isStickySession()
- Specified by:
isStickySession
in interface JkClusterMBean
- Returns:
- true if stcky session