In Glassfish 9.1, all instances in a cluster are configured identically. A component installed in a cluster is installed to all instances in that cluster. Likewise, service assemblies deployed to the cluster are deployed to each instance in the cluster. Each component in each instance will receive identical service units. This presents a challenge for components when they provision services based on metadata (e.g. WSDL) present in the service unit. There are three basic scenarios for a clustered deployment:
Multiple instances, separate hosts : service units which contain environment-senstitive information (e.g. hostname of JBI instance) will have problems here, but collision between components is not really an issue.
Multiple instances, same host : metadata collision is a real concern here, particularly for components which count on exclusive access to resources in the environment. A great example of this is binding to a port.
Two new configuration properties will be added to the SOAP BC:
Default HTTP port
Default HTTP/S port
The default port values will be used in lieu of the port numbers specified in the WSDL endpoint (soap:address). As long as the default port values are unique across all instances of the SOAP BC on a given host, there should not be an issue with port collision.
This page is not concerned with design-time issues related to WSDL and service assembly composition. That said, there are two things worth mentioning in this area:
The runtime support for a clustered SOAP BC is not dependent on design-time support in any way. The timeline for delivery of each aspect (design-time and runtime) may or may not line up.
I believe that the current plan is to add tokens for port/host information in the WSDL at design-time. If this is the case, some attention should be paid to how the token names will map to the component configuration property names used by the runtime to set the default port values.
Configuration MBean attributes for default HTTP and HTTP/s ports.
Fixed location and format of SOAP BC configuration file. I believe the current location of this file is /config.properties.
SOAP BC will be configured with default port values during instance creation. The most likely approach is to token-replace the config.properties file. An alternative is to start the component and configure it using its MBean, but that has some unsavory performance implications.
Default values will provide reasonable protection against collisions. The runtime cannot guarantee that an assigned port will be unique or will stay unique, so we need a story for how an admin deals with a conflict scenario (e.g. component startup fails - admin uses config interface to change default port settings). The following checks seem reasonable:
Check to see if port is currently in use
Check to see if port is assigned to another
HTTP Load Balancer
It is highly unlikely that a consumer of services offered by the SOAP BC will talk directly to one of the JBI instances. A more likely scenario involves the use of a HTTP load balancer which provides a single endpoint to consumers and routes requests to individual instances of the component in a cluster based on a routing table/algorithm.
The load balancer must be configured for each SOAP BC in a cluster. This is probably going to be a manual (i.e. user-initiated) process.
This section examines the scenarios in which the default ports of the SOAP binding would need to be configured.
When Glassfish is first installed (or the DAS is installed in the EE profile), a default 'server' instance is created. The SOAP BC will be automatically added to the default server instance and configured with a set of unique default ports.
Each time an instance is created (whether cluster or stand-alone) the SOAP BC is installed and configured with default ports.
The administrator may wish to change the default port settings of the SOAP BC at any time after instance creation. The SOAP BC and runtime must provide an interface which allows individual components in a cluster to be configured indendently.
If the SOAP BC is uninstalled and then re-installed, the default port settings must be reset at installation-time.