Oracle Application Server Tips by Burleson
To allow access to an OC4J instance, the
container maintains a number of listeners that listen on a port for
a request and then pass that request to the container. On the OC4J
Server Properties page (Figure 7), a range of ports was defined for
three methods of access.
Most web applications connect to the
Oracle HTTP Server (OHS) and communicate through the Apache Java API
(AJP). Another method uses a Java program to directly call a method
belonging to an EJB in the container. This is referred to as a
Remote Method Invokation (RMI). An RMI connection bypasses the OHS
and communicates directly with the OC4J container. Finally, the
container can be passed Java Messages using JMS.
OC4J containers normally maintain
listeners for each of these connection strategies. When the
Oracle9iAS instance is installed, it is configured to listen for
HTTP requests on port 7777. If that port is in use, the
configuration program will increment the port number by one until it
finds an unused port. The configuration utility configures the HTTP
port in the file: http-web-site.xml. OHS will listen for HTTP
requests on that port. If you remember the Server Properties
Page (Figure 7), there was a range of ports defined for AJP. When
OHS starts up, it negotiates with the OC4J container for an
available port within the defined range. Because OHS cannot
communicate with the container using AJP and receive an HTTP request
on the same port, you must insure that the port range available for
AJP does not contain the HTTP request port. The AJP port is defined
in the default-web-site.xml file. If it is defined as 0, then OHS
and the container negotiate the port within the defined port range.
If is defined as a port other than 0, then OHS and the container
will use the defined port.
Remote Method Invocation also requires
the use of a listener. The RMI listener is defined in the file
rmi.xml, located in the Server Root directory. This port is defined
during OC4J container creation and can only be modified in the
Advanced Properties section of the container Home Page.
The Java Message Service API also uses
a listener that is defined initially at container creation. This
port is located in the jms.xml file.
It is important to remember that one port
can only support one listener. You must insure that the ports
defined at the creation of the instance or are not included in the
available ports for negotiated listener ports.
The OC4J container is the heart of the
application server, supporting web components and EJBs with
communications, security, and reliability. Future chapters will
build on the capabilities discussed in this chapter, as we tie all
the parts together that make up the Application Server. Now that we
can configure our container and deploy an application into it, we
need to connect that application to a persistent storage or
This is an excerpt from "Oracle
10g Application Server Administration Handbook" by Don Burleson
and John Garmany.