When running in a clustered JBoss environment, you can choose not to specify a
Context.PROVIDER_URL value and let the client query the network for available naming services. This only works with servers running with the
all server profile, or an equivalent server profile that has
org.jboss.ha.jndi.HANamingService services deployed. The discovery process consists of sending a multicast request packet to the discovery address/port and waiting for any node to respond. The response is a HA-RMI version of the
Naming interface. The following
InitialContext properties affect the discovery configuration:
jnp.partitionName: The cluster partition name discovery should be restricted to. If you are running in an environment with multiple clusters, you may want to restrict the naming discovery to a particular cluster. There is no default value, meaning that any cluster response will be accepted.
jnp.discoveryGroup: The multicast IP/address to which the discovery query is sent. The default is 184.108.40.206.
jnp.discoveryPort: The port to which the discovery query is sent. The default is 1102.
jnp.discoveryTimeout: The time in milliseconds to wait for a discovery query response. The default value is 5000 (5 seconds).
jnp.disableDiscovery: A flag indicating if the discovery process should be avoided. Discovery occurs when either no
Context.PROVIDER_URL is specified, or no valid naming service could be located among the URLs specified. If the
jnp.disableDiscovery flag is true, then discovery will not be attempted.