There are three typical choices for an Oracle Application Express installation web servers : Oracle HTTP server with mod_plsql, Embedded PL/SQL Gateway (EPG) and the Oracle APEX Listener. Choosing one of these servers relates not only to features and performance, but also to the preferred technology stack. As EPG is an easy to configure lightweight server; it is not suited for enterprise applications or web application with heavy traffic. Oracle HTTP server might be the most common choice, but the APEX Listener is a Java 2EE alternative that might fit better into a Java technology stack.
Oracle HTTP server with mod_plsql
The Oracle HTTP server uses the mod_plsql extension to communicate with the Oracle database and with APEX. The server is delivered as a component of Oracle Fusion Middleware and is designed to serve both static and non-static web pages, acting as a HTTP listener for the Oracle Weblogic Server.
The Oracle HTTP Server is, in fact, an implementation of Apache HTTP server. Mod_plsql, as an extension, will provide HTTP generation from PL/SQL code, by mapping browser requests to database stored procedures.
A complete web request flow using this configuration is as follows:
- Oracle HTTP Server receives a request for a PL/SQL server page
- The request is forwarded to mod_plsql, which forwards it to the Oracle Database. It connects to the database by using Database Access Descriptors (DAD), configured in an external configuration file.
- Mod_plsql invokes the PL/SQL procedure, sending also the input parameters, using the PL/SQL Web Toolkit and database data.
- The response is sent to mod_plsql and then to the Oracle HTTP Server which send the HTML response back to the browser.
Configuring mod_plsl is detailed in the Oracle® Fusion Middleware User’s Guide for mod_plsql here: http://docs.oracle.com/cd/E15523_01/portal.1111/e12041/using.htm
Embedded PL/SQL Gateway
The Embedded PL/SQL Gateway was introduced as part of XMD DB on Oracle 9i release 2. It is an embedded HTTP server with minimal features that runs from within the database. It can be used as an embedded PL/SQL gateway since the release of Oracle 10g R2 database.
XML DB is a feature of the Oracle Database that offers native, high performance XML storage and retrieval technology. It is not a separate server that runs beside the Oracle database, but a group of technologies that manage high performance XML processing inside the database.
Configuring the embedded gateway is done via the package DBMS_EPG. As for the Oracle HTTP Server with mod_plsql, configuration relates more to the Database Access Descriptors (DAD), [SM2] whereas for the HTTP server they are configured using configuration files; for EPG the configuration is done using the DBMS_EPG package.
The documentation for using the DBMS_EPG package can be found here: http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_epg.htm
For example, creating a Database Access Description can be done by running the following PL/SQL script as sys:
dad_name => 'my_epg_dad',
path => '/my_epg_dad/*');
Oracle APEX Listener
The Oracle APEX Listener is the Java 2EE alternative to the previous APEX web servers. Released as of June 28th 2010, the Listener [SM3] was designed to service APEX and any other PL/SQL Web Toolkit application.
It is designed to be deployed in any Java web server, such as Oracle Web Logic Server, Oracle Glassfish Server and Oracle Containers for J2EE. As opposed to using EPG, which is intended for minimal configuration and light load, or Oracle HTTP Server with mod_plsql, which is designed for a particular set of web stack, the Oracle APEX Listener is aimed at developers who rely heavily on the Java stack.
The download and documentation for the Oracle APEX Listener can be found here: http://www.oracle.com/technetwork/developer-tools/apex-listener/overview/index.html
The APEX Listener has some additional functionality to the HTTP server with mod_plsql, such as a web-based configuration tool, enhanced security and file caching. Also, the connection to the database is done using an embedded JDBC driver, which means that it does not need a host Oracle database to run. Apart from installing the listener on a Java web server, it can also be installed in standalone mode, needing only the Java Virtual Machine to run.