A native web server connection module, or connector, is compiled for the specific web server, hardware architecture, and operating system. For example, JRun uses Apache modules to create the connectors for the Apache web server for each possible hardware architecture and operating system supported by JRun. You should not confuse the JRun web server connector with Sun J2EE Java Connector Architecture (JCA) connectors, which provide integration with back-end systems.
You can connect one or more web servers to each JRun server. In a simple deployment environment, you connect a web server to a single JRun server, which processes your applications. The following figure shows a single web server connected to a single JRun server:
When a request is made for an application resource, the connector on the web server opens a network connection to the JRun connection module (JCM) residing within the JRun server. The JCM serves as a transparent communicator and forwards the request from the connector to the JRun server. The JRun server handles the request and sends its reply back to the JCM.
You define the connection between a web server and a JRun server using a port number and an optional bind address. Each JRun server on a machine listens to a different network port for requests from a web server. This port is called the JRun proxy port or JRun control port (JCP). In the previous example, the default JRun server listens to port 51000. You must ensure that each JRun server on a computer has a unique setting for this port number. You specify this port number using the External Web Server Connection Configuration panel in the JMC.
You can also use a second parameter, interface, to define the connection between a web server and a JRun server. The interface attribute specifies the IP addresses of the native web servers from which the JRun server can receive requests. By default, the interface attribute is set to 127.0.0.1, indicating that a JRun server listens for requests from the localhost. You can use the JMC to specify these IP addresses.
You create a web server connector by running the Web Server Configuration tool. This tool, (which replaces the Connector Wizard used in JRun 3.x) is a Swing application that installs the connector on a web server, defining a connection between the web server and a JRun server.
������java -jar wsconfig.jar
You typically use the Web Server Configuration tool to configure a connection between the web server and JRun server running on the same computer. However, you do not have to install the web server and JRun on the same computer. The remaining discussions in this chapter provide more information on web server connector configuration options. For more information on running the Web Server Configuration tool, see Installing JRun.
Note: If the JRun server participates in a cluster, the web server connector automatically enables load balancing and failover. For more information, see "Connector-based clustering".
The Web Server Configuration tool stores properties in configuration files on the web server's computer, as follows:
The JRun web server connector uses these settings to help it find the JRun server and know which servers to connect to. The following table describes the JRun properties in the web server configuration files:
The serverstore property specifies the name of the file containing the machine names and JRun proxy ports for all JRun servers in a cluster. This file is named jrunserver.store by default. The proxyservers property contains a semicolon delimited list of the JRun servers in a cluster. The web server connector populates this property automatically when it starts up and detects that the bootstrap JRun server participates in a cluster. The following figure shows this process:
For more information, see "Connector-based clustering".
To help illustrate the web server configuration file parameters, this section provides examples of web server properties when the web server is connected to JRun. These examples assume that JRun and the web server are on the same computer.
A typical httpd.conf file for an installation of JRun on the same machine as an Apache web server follows.
The LoadModule statement can be outside of any VirtualHost directives in a multihosting environment because you can reference it only once at a global level. The LoadModule statement is required as DSO is required to run the web server connector.
Also, the Apache configuration file uses Mappings instead of rulespath.
LoadModule jrun_module libexec/mod_jrun.so
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
����JRunConfig Ssl false
JRunConfig Serverstore "/usr/apache/conf/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51000
#JRunConfig Errorurl <optionally redirect to this URL on errors>
</IfModule>
For IIS, JRun uses the jrun.ini file to initialize the jrun.dll filter. A typical jrun.ini file follows:
verbose=false
scriptpath=/JRunScripts/jrun.dll serverstore=C:/JRun4/lib/wsconfig/2/jrunserver.store bootstrap=127.0.0.1:51000 apialloc=false ssl=false #errorurl=<optionally redirect to this URL on errors>
A typical obj.conf file for Netscape/iPlanet web servers follows:
...
<Object name="jrun"> PathCheck fn="jrunfilter" Service fn="jrunservice" </Object> ...
A typical magnus.conf file for Netscape/iPlanet web servers follows:
...
Init fn="load-modules" shlib="C:/JRun4/lib/wsconfig/1/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice" Init fn="jruninit" serverstore="C:/JRun4/lib/wsconfig/1/jrunserver.store" bootstrap="127.0.0.1:51000" verbose="false" apialloc="false" ssl="false"
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/jrun/4/JRun_Administrators_Guide/connectors2.htm
Comments
No screen name said on Aug 26, 2003 at 8:44 AM :