When installing Oracle Application Express there are a number of key architecture and management areas to understand.
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.
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.
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.
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. 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.
Warning: mod_plsql is deprecated as of Oracle HTTP Server 12c (12.1.3). For more information, please see My Oracle Support Note 1576588.1. Oracle recommends using Oracle REST Data Services instead..
|Capabilities||Oracle REST Data Services||Embedded PL/SQL Gateway||Oracle HTTP Server|
|Image location||File system||Within database||File system|
|Configuration options||GUI Interface (Release >= 2.0); Administration pages||Database initialization parameters||Database Access Descriptor (DAD)|
|Connection Pool settings||JDBC connection parameters||SHARED_SERVERS; MAX_SHARED_SERVERS||Min/MaxSpareServers; MaxClients|
|Emit RESTful Web Services||Yes (Release >= 2.0)||No||No|
|Support multi-databases||Yes, including RAC||No||Yes, including RAC|
|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||Development only||All|
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.
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.
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.
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.
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.