Interface IClusterProvider
- All Superinterfaces:
IComponent
,IComponentProvider
,IInitializable
,IURIResolver
Provider to manage MWS web stack listener configuration, both stand-alone and
clustered.
Starting from 7.1.1 the API has been simplified and updated to support write-backs.
The old ISegment and IClusterRole API is deprecated but still works.
The configuration file migration is detected and performed automatically.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
Deprecated.static final String
Deprecated.static final String
Better name for PRIME/MASTER role.static final String
Deprecated.static final String
Deprecated.static final String
Better name for notification role This role is responsible for notifications deliverystatic final String
Deprecated.static final String
This role is responsible for maintaining search index for MWS content store and performing searches against this indexstatic final String
This role is responsible for task life cyclestatic final String
static final String
Fields inherited from interface com.webmethods.portal.system.IComponentProvider
ATTR_APP_NAME, ATTR_BEG_QUERY, ATTR_END_QUERY, ATTR_MID_QUERY, BIZPOLICY_MANAGER, CACHE_PROVIDER, COMMAND_PROVIDER, COMPONENTS_QUERY, INSTALL_PROVIDER, MECH_PROVIDER, METACONTEXT_PROVIDER, PHASE_PROVIDER, POLICY_PROVIDER, SEARCH_PROVIDER
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds previously created server to the cluster.Creates new empty server instance but does not add to the server list.Returns the clusterId from cluster.xml This id is created upon mws initialization It is used for identifying the current cluster within environments where multiple clusters can exist.Returns ContextPath from MWS front end url.int
Returns cluster front end URL secure port, if configured.Returns secure cluster front end URL, if configured, otherwise nullReturns cluster front end URL.Returns Universal messaging server's end point URL, if configured, otherwise nullgetPartition
(String serverName) Deprecated.getSegment
(String segmentName) Deprecated.Deprecated.Returns currently running server information.Retrieve a specific server instance by its name.Lists all server in the clusterboolean
Typically false on first time startup and during upgrade.boolean
isCurrentServer
(IServer server) Checks wether the supplied IServer instance is the currently running nodeboolean
Returns whether components deployment symmetrical across the cluster.default boolean
Retruns wether or not JMS is connected to the UM Serverboolean
isServerInRole
(String roleName) Checks whether the "current" server is in a given rolevoid
persistConfigFile
(boolean makeBackup) Persist current state of the provider to the configuration file being used for loading the configurationvoid
Re-creates the connection to whatever JNDI provider is currently set.void
void
updates the cluster server node list with the latest data from cluster.xmlboolean
Reloads Universal messaging server's end point URL, if changed.void
removeServer
(IServer server) Removes server from the cluster configuration.void
setClustered
(boolean enabled) Deprecated.- setting clustered to false is not allowed, clustering is automatically determined by the productvoid
setContextPath
(String contextPath) Sets Context Path for MWSvoid
setDeploymentSymmetrical
(boolean symmetrical) Updates current component deployment mode.void
setFrontEndSecurePort
(int port) Updates cluster front end URL secure portvoid
setFrontEndUrl
(URL frontEndUrl) Updates frontEndUrl for the cluster.void
setJNDIProviderURL
(String jndiProviderUrl) Updates cluster's JNDI provider URL to Universal messaging end point URLdefault void
setUseDBJms
(boolean useDBJms) void
Validates configuration.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.IComponentProvider
exists, getComponent, getComponent, getComponent, getComponentQueryString, getComponents, getDefaultComponent, getLogger, initDeferredWebAppComponents, lookup, registerComponent, reloadComponent, reloadComponent, unregisterComponent, upgradeComponentDataFromBootstrapComponentData
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
Methods inherited from interface com.webmethods.portal.system.IURIResolver
acquireURI, acquireURI
-
Field Details
-
SEGMENT_PREFIX
- See Also:
-
SERVER_PREFIX
- See Also:
-
SERVERROLE_UNKNOWN
- See Also:
-
CONTAINER
- See Also:
-
CLUSTER_XML
- See Also:
-
SERVERROLE_SEARCH
This role is responsible for maintaining search index for MWS content store and performing searches against this index- See Also:
-
SERVERROLE_TASKENGINE
This role is responsible for task life cycle- See Also:
-
SERVERROLE_AUTODEPLOY
Better name for PRIME/MASTER role. This role is responsible for components hot/auto deployment feature- Since:
- 7.1.1
- See Also:
-
SERVERROLE_NOTIFICATION
Better name for notification role This role is responsible for notifications delivery- Since:
- 7.1.1
- See Also:
-
SERVERROLE_FRONT_END
Deprecated.MWS does not check this role anywhere, it's purely logical. All servers have this role anyway- See Also:
-
SERVERROLE_PRIME
Deprecated.- See Also:
-
SERVERROLE_AGENT
Deprecated.- See Also:
-
SERVERROLE_JSP
Deprecated.- See Also:
-
SERVERROLE_AGENT_ROUTING
Deprecated.- See Also:
-
USE_DB_JMS
- See Also:
-
-
Method Details
-
isServerInRole
Checks whether the "current" server is in a given role- Parameters:
roleName
- the role to check- Returns:
- true if the current server is in this role
-
getServer
IServer getServer()Returns currently running server information. Never null.- Returns:
IServer
object for the current server
-
getServers
Lists all server in the cluster- Returns:
- list of
IServer
-
getServer
Retrieve a specific server instance by its name. Return null if server does not exist- Parameters:
serverName
- server node name- Returns:
- server instance or null if not found
-
getPartitions
List<IPartition> getPartitions() -
getPartition
-
getPartition
IPartition getPartition() -
getLastPartition
IPartition getLastPartition() -
getClusterPartitionProvider
IClusterPartitionProvider getClusterPartitionProvider() -
reloadClusterPartitionProvider
- Throws:
Exception
-
reloadClusterServers
updates the cluster server node list with the latest data from cluster.xml- Throws:
PortalException
-
isClustered
boolean isClustered()Typically false on first time startup and during upgrade. Other times is true because it is required for platform shared components to receive notifications. If false no JMS notifications are generated.- Returns:
- whether or not we're running in a cluster or support shared components like Shared Security.
-
getClusterId
String getClusterId()Returns the clusterId from cluster.xml This id is created upon mws initialization It is used for identifying the current cluster within environments where multiple clusters can exist.- Returns:
- - the unique cluster id
-
isCurrentServer
Checks wether the supplied IServer instance is the currently running node- Parameters:
server
- - a Server instance- Returns:
- - true if the server names of the current server and the supplied one are equal
-
setClustered
Deprecated.- setting clustered to false is not allowed, clustering is automatically determined by the productEnables or disables running in a cluster or shared components notifications.- Parameters:
enabled
-
-
isDeploymentSymmetrical
boolean isDeploymentSymmetrical()Returns whether components deployment symmetrical across the cluster. If symmetrical, then install policy handles distributed component deployment events to propagate any hot-deployment activities to all other cluster nodes that are currently online: - component deploymment - component update - component undeployment If asymmetrical, then components must be deployed, updated and undeployed on each cluster node and there is a possibility for incremental cluster updates, one node at a time. Default value is 'false'- Returns:
- true if symmetric, false if asymmetric
- Since:
- 7.1.2
-
setDeploymentSymmetrical
Updates current component deployment mode. The change takes effect right away on this node and afterpersistConfigFile(boolean)
on all other nodes- Parameters:
symmetrical
- true or false- Throws:
PortalException
- Since:
- 7.1.2
-
getFrontEndUrl
URL getFrontEndUrl()Returns cluster front end URL. Replacement forISegment.getFrontEndUrl()
- Since:
- 7.1.1
-
setFrontEndUrl
Updates frontEndUrl for the cluster.- Parameters:
frontEndUrl
- new URL- Throws:
PortalException
- Since:
- 7.1.1
- See Also:
-
getFrontEndSecurePort
int getFrontEndSecurePort()Returns cluster front end URL secure port, if configured. Otherwise return <= 0.- Returns:
- Since:
- 8.0.1
-
setFrontEndSecurePort
Updates cluster front end URL secure port- Throws:
PortalException
- Since:
- 8.0.1
-
getFrontEndSecureUrl
URL getFrontEndSecureUrl()Returns secure cluster front end URL, if configured, otherwise null- Since:
- 8.0.1
-
setJNDIProviderURL
Updates cluster's JNDI provider URL to Universal messaging end point URL- Throws:
PortalException
- Since:
- 9.7
-
getJNDIProviderURL
String getJNDIProviderURL()Returns Universal messaging server's end point URL, if configured, otherwise null- Since:
- 9.7
-
isJMSConnected
default boolean isJMSConnected()Retruns wether or not JMS is connected to the UM Server- Since:
- 10.7
-
reloadJNDIProviderURL
boolean reloadJNDIProviderURL()Reloads Universal messaging server's end point URL, if changed.- Returns:
- - returns "true" if reloaded URL successfully.Returns "false" if URL has not changed or an error has occurred.
- Since:
- 9.12
-
recreateJNDIConnection
Re-creates the connection to whatever JNDI provider is currently set.- Throws:
InitializationException
- - if a provider has already been created.- Since:
- 9.12
-
createServer
IServer createServer()Creates new empty server instance but does not add to the server list. This instance can be customized using its properties before it is added to the server list. To add this server need to call#addServer(String)
- Returns:
- Since:
- 7.1.1
-
addServer
Adds previously created server to the cluster. To persist the changes callpersistConfigFile(boolean)
- Parameters:
server
- the server to add- Throws:
PortalException
- Since:
- 7.1.1
-
removeServer
Removes server from the cluster configuration. To persist the changes callpersistConfigFile(boolean)
- Parameters:
server
- the server to remove- Throws:
PortalException
- Since:
- 7.1.1
-
validateConfiguration
Validates configuration. Checks singleton roles (SERVERROLE_AUTODEPLOY
andSERVERROLE_SEARCH
) restrictions, http listeners requirements, etc...- Throws:
PortalException
-
persistConfigFile
Persist current state of the provider to the configuration file being used for loading the configuration- Parameters:
makeBackup
- whether to create backup file first- Throws:
IOException
PortalException
- Since:
- 7.1.1
-
getSegment
Deprecated.This API now always returns the same fake 'default' segment instance. -
getSegments
Deprecated.Always returns a singleton collection forgetSegment()
- Returns:
- list of
ISegment
-
getSegment
Deprecated.Always returnsgetSegment()
-
getContextPath
String getContextPath()Returns ContextPath from MWS front end url. if configured, otherwise "" e.g. if frontEndUrl is http://localhost:8585/foo. it will return "foo".- Since:
- 9.8
-
setContextPath
Sets Context Path for MWS- Since:
- 9.8
-
setUseDBJms
default void setUseDBJms(boolean useDBJms)
-