Oracle Application Express

Deployment

Installation


When installing Oracle Application Express there are a number of key architecture and management areas to understand.

Database

Oracle Application Express is a no-cost option of the Oracle Database which is fully supported as part of your Oracle Database maintenance agreement. It can be installed into any edition of the Oracle Database 10.2.0.4 and above, which includes Enterprise Edition, Standard Edition, Standard Edition One, and Express Edition (XE). Starting with Oracle Database 11gR1, Application Express is installed as part of the standard Oracle Database. Oracle strongly recommends that you upgrade to the latest version of Application Express available on the Oracle Technology Network (OTN). Oracle Application Express cannot be installed into any other relational database.

Oracle Application Express can be installed into an Oracle Real Application Clusters (RAC) environment. If you intend to install Application Express into a RAC environment then you should review the associated Application Express and RAC White Paper and also run the script file apxpart.sql, provided as part of the installation files under the utilities directory.

The installation of Application Express creates a separate schema (APEX_040200 for APEX 4.2) to house the programs that make up the Application Express engine and related metadata tables. Oracle recommends you create tablespaces specifically for the Application Express engine and Application Express files to enable better management and monitoring For example, Tablespace APEX_TS_040200 would contain the Application Express engine and APEX_TS_FILES for the Application Express files, but the names are arbitrary. Your initial installation step, as outlined in the Oracle Application Express Installation Guide, Downloading from Oracle Technology Network, would then be
@apexins APEX_TS_040200 APEX_TS_FILES TEMP /i/.
As a best practice, install Oracle Application Express into the database(s) which have the database objects you wish to use in your applications. You can also utilize Oracle database links and integrate your applications with Web Services.

Application Express Database Connectivity - Shows APEX linking to local data source, database links, and/or Web Services

Web Listener

Oracle Application Express utilizes a simple architecture where pages are dynamically generated using metadata stored within the Oracle Database. There is no code generation or file based compilation. Once fully installed, the Uniform Resource Locator (URL) will be defined for both developers and end users to access Application Express. Users require only a Web browser and the required URL. No additional client software is required.

Application Express Architecture - Shows browser communicating via Web listener to database with APEX installed

The Web Listener functions as a communications broker between the Web browser and the Oracle Application Express objects in the Oracle database by mapping browser requests into database stored procedure calls. You have a choice of three Web Listener choices.

The Web listener options include:
Oracle REST Data Services (formerly APEX Listener) - The Oracle REST Data Services (ORDS) is Java based, can be installed into any J2EE compliant Web Server, and is the preferred option for use with Oracle Application Express. It is a free tool that is fully supported against Oracle WebLogic Server, Oracle Glassfish Server, and Apache Tomcat. Oracle REST Data Services is part of the reference architecture used to operate the Oracle Database Cloud Service.
Note: There are licensing costs associated with Oracle WebLogic Server and Oracle Glassfish Enterprise edition. Oracle Glassfish Community edition is a no cost option.
Oracle HTTP Server - The Oracle HTTP Server (Apache) with mod_plsql plugin can be placed on the same physical machine as the database, or on a separate physical machine.
Note: If installed on the same physical machine as the database then the Oracle HTTP Server is included as part of the limited-use license included with the Oracle Database license - otherwise the Oracle HTTP Server will need to be licensed.
Embedded PL/SQL Gateway - The Embedded PL/SQL Gateway (EPG) runs in the Oracle XML DB Protocal Server within the Oracle database and includes the core features of mod_plsql. Licensing for the Embedded PL/SQL Gateway is included with the Oracle Database license.

Capabilities Oracle REST Data Services Oracle HTTP Server Embedded PL/SQL Gateway
Image location File system File system Within database
Configuration options GUI Interface (Release >= 2.0); Administration pages Database Access Descriptor (DAD) Database initialization parameters
Connection Pool settings JDBC connection parameters Min/MaxSpareServers; MaxClients SHARED_SERVERS; MAX_SHARED_SERVERS
Emit RESTful Web Services Yes (Release >= 2.0) No No
Support multi-databases Yes, including RAC Yes, including RAC No
Virus scan files Yes, with integration of ICAP server No No
PDF printing Yes, included FOP support (Release >= 2.0) No No
Environment recommendations All All Development only

 

Multi-Tenancy

Oracle Application Express enables a single database to host large numbers of applications and users. Developers work in a dedicated work area called a workspace to develop applications against one or more schemas. This flexible architecture enables a single database instance to act as a "Platform as a Service" (PaaS), providing a hosted Intranet capability within the organization, or hosted Internet service. It is common for workspaces to be defined for separate departments within an organization so that each department can develop their own database objects and applications independently.

Application Express Multi-Tenancy - Shows many to many relationship between workspaces and schemas

Roles and Responsibilities

Individuals who access the Oracle Application Express environment can have different roles, responsibilities and rights.
There are four major roles associated with Application Express:
Instance Administrator - Responsible for instance configuration and monitoring, including workspace provisioning, feature configuration, security, and instance settings.
Workspace Administrator - Responsible for requesting, monitoring, and maintaining developers within a workspace. Generally also have developer responsibilities.
Developer - Develop applications and required database objects, if objects not already available.
End User - Defined users for applications that utilize Application Express User authentication scheme.

In general you only need to define a few instance administrators to work with database administrators and system architects to correctly configure and manage the Oracle Application Express environment. For each workspace there must be at least one workspace administrator, and any number of developers. Workspace administrators are responsible for maintaining the developer credentials. Defining end users within the Application Builder is only required if applications are using the Application Express User authentication scheme. If the applications are public, requiring no authentication, or other authentication schemes such as SSO, LDAP, custom, etc. are utilized by the applications then you will not need to define end users.

Environments

As with any software development lifecycle, Oracle strongly recommends that you have different environments for development, test / QA, and production. As a best practice, install "Runtime Only" Application Express within your test and production environments. This removes the Application Builder and SQL Workshop components from your test and production environments and forces developers to make all changes directly in your development environment. Developers should check all applications, and associated files, into a source control system, and have Database Administrators (DBAs) check-out and run scripts directly from source control into test and production.

Database Jobs

When Oracle Application Express is installed, four database jobs are created. In order for Application Express to operate correctly, these jobs must run regularly.
The installed database jobs include:
ORACLE_APEX_DAILY_MAINTENANCE - Runs at 0100 system time daily; Archives activity logs, purges workspaces and deletes expired files.
ORACLE_APEX_PURGE_SESSIONS - Runs hourly; Deletes session information from APEX tables for sessions older than 12 hours.
ORACLE_APEX_MAIL_QUEUE - Runs every 5 minutes; Sends messages in the the e-mail queue.
ORACLE_APEX_WS_NOTIFICATIONS - Runs every 30 minutes; Sends Websheet notifications.

Database Backup

Standard Oracle backup and recovery techniques should be used to backup workspace schemas and the APEX engine (APEX_040200 for APEX 4.2). However, restoring the Application Express engine restores metadata for all applications in all workspaces, overwriting any application updates made since the backup. If it is essential to restore specific applications from a backup it is recommended that the APEX engine schema is restored into a separate Oracle Database and then export the application from this installation. Oracle Database flashback capabilities can be used to export an application "As Of" which will potentially allow developers to create an export from some period earlier, however, flashback only extends a certain amount of time depending on database parameter settings. Developers should perform their own regular backups of both their applications and other files until the code is complete and checked into the source control system.