Configure URL Endpoints

Overview

There are two ways to configure URL endpoints for deployment.

The first is to use URL Libraries from within the framework server. This creates URL A URL Library contains one or more URLs, and is stored on the framework server as an XML file. On deploymen, this file is read by the jython framework and URL endpoints are configured in the target cell.

The second method allows you to add URL Libraries and endpoints directly into the jython file using properties (name/value pairs).

This page considers the second case only.

Each set of name/value pairs is terminated with _n where n is an integer, incrementing from 1 and referencing the next Provider and URL to be created or modified.

Standard URLs at 'Cell' Scope: Single URL shared between all cluster members in a cluster

The following is an example of a standard URL definition, subsequently mapped to the application as described in other articles. This is the usual scenario where the cluster points to a single 'service'. How the service handles its own load balancing is up to that service to decide.

#---------------------------------------------------
# URL Provider 1 and URL Resource Related Variables
#---------------------------------------------------
urlpName_1 = "urlProvider_MV_SysTst11"
urlpStreamHandlerClassName_1 = "unused"
urlpProtocol_1 = "unused"
urlpScope_1 = "cell"
urlName_1 = "FinancialTransactionProcessingWS_MV_SysTst11"
urlJNDIName_1 = "url/"+urlName_1
urlDestination_1 = "http://10.254.112.25:42505/MvPaymentProcessingService"

The cluster is mapped to url/FinancialTransactionProcessingWS_MV_SysTst11. If other WebSphere clusters map to this JNDI name, they will use the same endpoint. This is not recommended. Normally they would map to their own (named according to cluster) JNDI name.

Mapped URLs at 'Server' Scope: Each cluster member maps to its own URL

In this scenario, we decide how to load balance the target service at the WebSphere cluster member level. We can specify each server instance to point to a backend instance.

#---------------------------------------------------
# URL Provider 1 and URL Resource Related Variables
#---------------------------------------------------
urlpName_1 = "urlProvider_MV_SysTst11"
urlpStreamHandlerClassName_1 = "unused"
urlpProtocol_1 = "unused"
urlpScope_1 = "server"
urlName_1 = "FinancialTransactionProcessingWS_MV_SysTst11"
urlJNDIName_1 = "url/"+urlName_1
urlDestination_1 = "http://10.254.112.25:42505/MvPaymentProcessingService"
specifiedUrlDestinationMapping_1 = [[["targetNode", "dpp01"], ["targetURL", "http://10.254.112.25:42505/MvPaymentProcessingService"]]]
specifiedUrlDestinationMapping_1.append([["targetNode", "dpp02"], ["targetURL", "http://10.254.112.25:42506/MvPaymentProcessingService"]])

Here we see that urlpScope_1 = 'server' denoting that the resource will be created at server scope for all cluster members. We can create/append specifiedUrlDestinationMapping, which will map each cluster member in turn to the specified destination. Once all destinations have been used, if there are cluster members remaining, these will start again from the beginning of the list.

In the above example, if there are 4 cluster members, the mapping will be as follows:

  • ClusterMember 1 http://10.254.112.25:42505/MvPaymentProcessingService
  • ClusterMember 2 http://10.254.112.25:42506/MvPaymentProcessingService
  • ClusterMember 3 http://10.254.112.25:42505/MvPaymentProcessingService
  • ClusterMember 4 http://10.254.112.25:42506/MvPaymentProcessingService

and so on

Mapped URLs at 'Node' Scope: Each WebSphere node is mapped to a URL.

In this scenario, we decide how to load balance the target service at the WebSphere node level. We can specify each node and all cluster members installed on that node to point to a backend instance.

#---------------------------------------------------
# URL Provider 1 and URL Resource Related Variables
#---------------------------------------------------
urlpName_1 = "urlProvider_MV_SysTst11"
urlpStreamHandlerClassName_1 = "unused"
urlpProtocol_1 = "unused"
urlpScope_1 = "node"
urlName_1 = "FinancialTransactionProcessingWS_MV_SysTst11"
urlJNDIName_1 = "url/"+urlName_1
urlDestination_1 = "http://10.254.112.25:42505/MvPaymentProcessingService"
specifiedUrlDestinationMapping_1 = [[["sourceNode", "wasNode1"], ["targetURL", "http://10.254.112.25:42505/MvPaymentProcessingService"]]]
specifiedUrlDestinationMapping_1.append([["sourceNode", "wasNode1"], ["targetURL", "http://10.254.112.25:42506/MvPaymentProcessingService"]])

Here we see that urlpScope_1 = 'node' denoting that the resource will be created at node scope for all nodes. We can create/append specifiedUrlDestinationMapping, which will map each WebSphere node in turn to the specified destination. There must be a mapping specified for each WebSphere node, even if multiple nodes point to the same backend URL

In the above example, if there are 4 cluster members, the mapping will be as follows:

  • wasNode1 http://10.254.112.25:42505/MvPaymentProcessingService
  • wasNode2 http://10.254.112.25:42506/MvPaymentProcessingService

and so on