web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Configuring your Apache web server to invoke a CORBA server For example: ClusterList=cluster1,cluster2,cluster3 cluster1.webcontainer_id = tc_inst1 cluster2.webcontainer_id = corbaloc::127.20.20.2:20202,:127.20.20.3:20202/ tc_inst2 cluster2.enable_loadbalancing = true Note Note cluster3.webcontainer_id = tc_inst3 cluster3.enable_loadbalancing = false In the above example, the following three clusters are defined: 1 The first, uses the osagent naming scheme and is enabled for load balancing. 2 The second cluster employs the corbaloc naming scheme, and is also enabled for load balancing. 3 The third uses the osagent naming scheme, but has the load balancing features disabled. To disable use of a particular cluster, simply remove the cluster name from the ClusterList list. However, we recommend you do not remove clusters with active http sessions attached to the CORBA server (attached users), because requests to these “live” sessions will fail. Modifications you make to the WebClusters.properties file automatically take effect on the next request. You do not need to restart your server(s). Mapping URIs to defined clusters Once the cluster entry is defined, all that remains is to identify which HTTP requests received by the web server need to be forwarded to your CORBA server. Use the UriMapFile.properties file to map http uri strings to web cluster names (CORBA instances) configured in the WebClusters.properties file. ■ In the UriMapFile.properties file, type: = where is a standard URI string or a wild-card string, and is the cluster name as it appears in the ClusterList entry in the WebClusters.properties file. For example: /examples = cluster1 /examples/* = cluster1 Note /petstore/index.jsp = cluster2 /petstore/servlet/* = cluster2 In this example: ■ ■ Any URI that starts with /examples will be forwarded to a CORBA server running in the “cluster1” web cluster. URIs matching either /petstore/index.jsp or starting with /petstore/servlet will be routed to “cluster2”. With the URI mappings, the wild-card “*” is only valid in the last term of the URI and may represent the follow cases: ■ ■ the whole term (and all inferior references) as in /examples/*. the filename part of a file specification as in /examples/*.jsp. Chapter 8: Apache web server to CORBA server connectivity 71

Configuring your Apache web server to invoke a CORBA server Note Modifications you make to the UriMapFile.properties file automatically take effect on the next request. You do not need to restart your server(s). If the WebCluster.properties or UriMapFile.properties is altered, then it is automatically loaded by the IIOP connector. This means that modifications to either of these files can be done so without starting up or shutting down the web server(s) or CORBA server(s). 72 BES Developer’s Guide

Configuring your Apache <strong>web</strong> <strong>server</strong> to invoke a CORBA <strong>server</strong><br />

For example:<br />

ClusterList=cluster1,cluster2,cluster3<br />

cluster1.<strong>web</strong>container_id = tc_inst1<br />

cluster2.<strong>web</strong>container_id = corbaloc::127.20.20.2:20202,:127.20.20.3:20202/<br />

tc_inst2<br />

cluster2.enable_loadbalancing = true<br />

Note<br />

Note<br />

cluster3.<strong>web</strong>container_id = tc_inst3<br />

cluster3.enable_loadbalancing = false<br />

In the above example, the following three clusters are defined:<br />

1 The first, uses the osagent naming scheme and is enabled for load balancing.<br />

2 The second cluster employs the corbaloc naming scheme, and is also enabled for<br />

load balancing.<br />

3 The third uses the osagent naming scheme, but has the load balancing features<br />

disabled.<br />

To disable use of a particular cluster, simply remove the cluster name from the<br />

ClusterList list. However, we recommend you do not remove clusters with active http<br />

sessions attached to the CORBA <strong>server</strong> (attached users), because requests to these<br />

“live” sessions will fail.<br />

Modifications you make to the WebClusters.properties file automatically take effect on<br />

the next request. You do not need to restart your <strong>server</strong>(s).<br />

Mapping URIs to defined clusters<br />

Once the cluster entry is defined, all that remains is to identify which HTTP requests<br />

received by the <strong>web</strong> <strong>server</strong> need to be forwarded to your CORBA <strong>server</strong>. Use the<br />

UriMapFile.properties file to map http uri strings to <strong>web</strong> cluster names (CORBA<br />

instances) configured in the WebClusters.properties file.<br />

■<br />

In the UriMapFile.properties file, type:<br />

= <br />

where is a standard URI string or a wild-card string, and <br />

is the cluster name as it appears in the ClusterList entry in the<br />

WebClusters.properties file.<br />

For example:<br />

/examples = cluster1<br />

/examples/* = cluster1<br />

Note<br />

/petstore/index.jsp = cluster2<br />

/petstore/servlet/* = cluster2<br />

In this example:<br />

■<br />

■<br />

Any URI that starts with /examples will be forwarded to a CORBA <strong>server</strong> running in<br />

the “cluster1” <strong>web</strong> cluster.<br />

URIs matching either /petstore/index.jsp or starting with /petstore/servlet will be<br />

routed to “cluster2”.<br />

With the URI mappings, the wild-card “*” is only valid in the last term of the URI and<br />

may represent the follow cases:<br />

■<br />

■<br />

the whole term (and all inferior references) as in /examples/*.<br />

the filename part of a file specification as in /examples/*.jsp.<br />

Chapter 8: Apache <strong>web</strong> <strong>server</strong> to CORBA <strong>server</strong> connectivity 71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!