You are on page 1of 64

Apache

+ ORDS Quickstart für


Produk9onsumgebungen

Dietmar Aust
Opal-Consul9ng, Köln
www.opal-consul9ng.de
Opal Consul9ng

► Dipl.-Inform. Dietmar Aust, Freelance Consultant


▪  Master's Degree in Computer Science (MSCS)

► Building Oracle based Web Applica9ons since 1997


▪  Portal, Forms, Reports, OWA Toolkit, now APEX!

► 1997-2000: Consultant at Oracle Germany

► Since 09/2000: Freelance Consultant, Since 2006 – APEX


only!

► Blog: h]p://daust.blogspot.com/

► Regular presenter at Oracle conferences (ODTUG, DOAG,


OOW)

► Author of the JasperReportsIntegra9on toolkit


▪  h]p://www.opal-consul9ng.de/tools

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 2
Environments
► 100 nominees in the categories (chosen by the community)
▪  SQL
▪  PL/SQL
▪  APEX
▪  ORDS
▪  Database Design

► 35 finalists

► Organized by Oracle , chosen through popular vote by the community

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 3
Environments
Opal Consul9ng

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 4
Environments
Why And What?

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 5
Environments
Why And What?

► WHAT?

► Set up a producMon environment for our Oracle APEX instance.

► Characteris9cs
▪  Fits 80% of deployments
▪  Intranet usage mainly
▪  “Basic” security measures and good performance

► The proposed setup is flexible and can be extended in order to sa9sfy more
elaborate requirements for higher security and even be]er performance

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 6
Environments
Why And What?

► WHY?

► Infrastructure for Oracle APEX producMon environments oRen poorly


configured:
▪  S9ll use the embedded PL/SQL gateway
▪  ORDS connec9on pool not properly configured

► People find it hard to implement the recommended setup with an Apache


h]p server and ORDS, because it seems to be complicated

► My personal interest:


▪  Want to have a step-by-step guide to implement the recommended architecture
▪  Want to have a presenta9on to educate my clients regarding the architecture
and the best setup

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 7
Environments
Understanding the
Architecture

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 8
Environments
Understanding the Architecture
Overview and Components

http http JDBC

Oracle

https AJP SQLNet

Browser Webserver PL/SQL Gateway Oracle DB

Serve static files
 Translate URL 
 APEX: 



SSL termination
 /ords/f?p=100:1 
 Execute Logic
Cache / Proxy
 => 

Compression
 call to stored 
 &
... procedure Generate HTML

Apache Http Server,
 ORDS



Nginx, 
 mod_plsql
 Oracle 11.1.0.7 

IIS / Windows
 dbms_epg
 and higher
Apache Tomcat, 
 ...
 Oracle XE 11g
Oracle XML DB

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 9
Environments
Understanding the Architecture
Consequences / Insights

► The WORK is done IN THE DATABASE

► The Webserver and PL/SQL gateway don’t need a lot of processing power,
most of the 9me idle

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 10
Environments
Understanding the Architecture
Recommended Architecture

► The components in this presenta9on:


▪  Windows 7 32 bit (virtual machine)
▪  Apache 2.4
▪  Tomcat 8
▪  ORDS 3.0
▪  Oracle XE 11g
▪  APEX 5.0.1

TNS Listener
ORDS 3.0
Oracle
https AJP JDBC

Apache http Tomcat 8 Oracle XE 11g


Server 2.4 ORDS 3.0 APEX 5.0

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 11
Environments
Understanding the Architecture
Database Users

ORDS is currently moving from APEX Dependency to APEX Independence

► ORDS needs a REPOSITORY to store its webservice defini9ons

► ORDS 2.0 ► ORDS 3.0

► Schemas ► Schemas
▪  APEX_040200 ▪  ORDS_METADATA
▪  APEX_LISTENER ▪  ORDS_PUBLIC_USER
▪  APEX_REST_PUBLIC_USER
► Configuration via
► Configuration via ▪  SQL Developer
▪  APEX SQL Workshop ▪  PL/SQL API

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 12
Environments
Understanding the Architecture
Database Users OPTIONALLY installed 

when using 

REST services
APEX_PUBLIC_USER
APEX / OWA main connec9on pool
Size according to number of concurrent apex users
ORDS 2.0

APEX_LISTENER (with APEX 4.2.2+)


Reads REST Defini9ons from repository APEX_040200

APEX_REST_PUBLIC_USER (with APEX 4.2.2+)


REST Connec9on pool for all REST opera9ons
Size according to concurent REST calls

► Users APEX_LISTENER and APEX_REST_PUBLIC_USER were created using the


script apex_rest_config.sql as part of the APEX installa9on.

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 13
Environments
Understanding the Architecture
Database Users

► ORDS 3.0 support RESTful Webservices even without APEX

APEX_PUBLIC_USER
APEX / OWA main connec9on pool
Size according to number of concurrent apex users
ORDS 3.0

ORDS_METADATA
Stores REST Defini9ons

ORDS_PUBLIC_USER
REST Connec9on pool for all REST opera9ons
Size according to concurent REST calls

► Currently there is s9ll the need for the users APEX_LISTENER and
APEX_REST_PUBLIC_USER:
▪  The new download of sta9c applica9on files and sta9c workspace files require it
▪  So that you can con9nue to use the management interface in the SQL Workshop
(else you have to use SQL Developer)

Setting Up the Oracle APEX Listener (Now ORDS) for Production
Environments
23.06.2015 Page 14
Understanding the Architecture
Database Users

► Should we migrate the exis9ng RESTful defini9ons in our APEX environment?

▪  => !!! NO !!!


► What happens?
▪  They get copied over from APEX_050000 => ORDS_METADATA
▪  Now they exist in two places redundantly
▪  In this situa9on the defini9on stored in ORDS_METADATA “wins” over the
defini9on stored in APEX
▪  Through the management interface in APEX you s9ll manage the “OLD” defini9on

► This is too confusing, thus:


▪  Keep the defini9ons separate
▪  Either create new ones with SQL Dev directly or s9ll using the SQL Workshop in
APEX

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 15
Environments
Installa9on

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 16
Environments
Installa9on
Overview of the Installa9on

Layered Approach, step by step

► Install / configure repository and users in database

► Configure connec9on pool for ORDS

► Start in standalone mode, then TEST it

► Deploy ORDS to Tomcat, then TEST it

► Configure Apache h]p Server as a proxy to Tomcat, then TEST it

► Security and Op9miza9ons

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 17
Environments
Installa9on
Install / configure repository and users in database

► Regular install of APEX 5.0


▪  apex_ins.sql

► Configure apex REST support


▪  apex_rest_config.sql
▪  User APEX_LISTENER and
APEX_REST_PUBLIC_USER
are created

apex_rest_config.sql must
also be executed aRer the upgrade
to APEX 5.0 !!! Even if it was
installed in APEX 4.2.x !!!

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 18
Environments
Installa9on
ORDS 3.0 Download

►  Download ORDS 3.0


▪  h]p://www.oracle.com/technetwork/developer-tools/rest-data-services/
downloads/index.html
▪  ords.3.0.2.294.08.40.zip Java JDK 1.7 is required
Test: javac -version
►  Install on the command line using
▪  java –jar ords.war <command>
▪  Help: java –jar ords.war help

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 19
Environments
Installa9on
ORDS 3.0 Background

►  ords.war is a J2EE applica9on which can be


▪  deployed to Weblogic, Glassfish or Tomcat
▪  “deployed” into itself and run in standalone mode because it has a Je]y J2EE
container embedded into the .war file => easy for tes9ng and development

►  ORDS needs configura9on files for connec9on pools and standalone mode
▪  The command line installa9on will MODIFY the ords.war file and register a
reference to the directory containing the config files

java -jar ords.war configdir c:\app\ords_3.0

updates a reference to the config directory IN


the ords.war file

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 20
Environments
Installa9on
ORDS 3.0 Background

►  Configura9on Files
▪  defaults.xml
−  All Common sevngs and defaults for all connec9on pools

▪  ords/standalone/standalone.proper9es
−  Standalone mode configura9on for Je]y (/i/ loca9on and port #)
▪  conf/apex.xml (APEX_PUBLIC_USER)
▪  conf/apex_al.xml (APEX_LISTENER)
▪  conf/apex_rt.xml (APEX_REST_PUBLIC_USER)
▪  conf/apex_pu.xml (ORDS_PUBLIC_USER)
▪  role-mapping.xml
−  Maps Webserver Roles into RESTful Roles
▪  url-mapping.xml
−  Mul9ple database configura9ons

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 21
Environments
Installa9on
ORDS 3.0 Background

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 22
Environments
Installa9on
ORDS 3.0 Background

►  Axer the installa9on we must op9mize the connec9on pool


▪  apex.xml (APEX_PUBLIC_USER, main connec9on pool)
▪  apex_al.xml (used for serving sta9c applica9on and workspace files) – not as
high as the others
▪  apex_rt.xml (used for serving sta9c applica9on and workspace files)

►  A sample configura9on:
▪  jdbc.Ini9alLimit=15
−  #sessions created in the connec9on pool at startup

▪  jdbc.MaxLimit=50
−  max. number of concurrent sessions allowed

▪  jdbc.Inac9vityTimeout=1800
−  Connec9on is not used for 1800 seconds => removed from pool

▪  jdbc.MinLimit=15
−  Min. number of connec9ons in pool, even if inac9vityTimeout has passed

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 23
Environments
Installa9on
ORDS 3.0 Background

► Op9miza9on is always difficult, monitoring the current usage, then trial and
error

► Simple monitoring
SELECT username, status, COUNT (*) cnt
FROM v$session
WHERE username LIKE '%APEX%' OR username LIKE '%ORDS%'
GROUP BY username, status;

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 24
Environments
Installa9on
ORDS 3.0 Background

►  If anything goes wrong during the installa9on - you can repeat the process,
but you have to clean up the config files beforehand
▪  All config files in c:\app\ords_3.0\conf (including the subdirectories)
▪  ords_params.properties (the installer will remember our previous prompt
and not ask again)

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 25
Environments
Installa9on
Install ORDS 3.0

►  Create a directory to hold the ORDS configura9on, i.e. the defini9on of the
different connec9on pools
▪  mkdir c:\app\ords_3.0\conf

►  Extract the installa9on scripts


▪  java -jar ords.war ords-scripts

►  Run the installa9on scripts to install the ORDS repository


▪  sqlplus "sys as sysdba" @ords_manual_install SYSAUX TEMP
"c:\app\ords_3.0\log\“

►  Configure the connec9on pool


▪  java -jar ords.war setup advanced
▪  Enter the loca9on to store configura9on data: c:\app\ords_3.0\conf
▪  Configure the APEX Gateway
▪  Configure the APEX_LISTENER and APEX_REST_PUBLIC_USER Accounts

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 26
Environments
Installa9on
Install ORDS 3.0

►  Start in standalone mode


▪  java -jar ords.war standalone
▪  Sta9c image files for standalone mode: c:\app\apex_5.0.1\apex\images
▪  H]p Port: 8090

►  Test: http://localhost:8090/

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 27
Environments
Installa9on
Install ORDS 3.0

►  Op9mize the connec9on pool


▪  apex.xml
▪  apex_al.xml
▪  apex_rt.xml

► Sevngs:
▪  jdbc.Ini9alLimit=15
▪  jdbc.MaxLimit=50
▪  jdbc.MinLimit=15

► Restart ords.war standalone and test the configura9on again (verify syntax in
config file) : h]p://localhost:8090/

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 28
Environments
Installa9on
Install Tomcat 8

►  Download Apache Tomcat 8 for Windows 32bit – Service installer


▪  h]p://tomcat.apache.org/download-80.cgi
▪  apache-tomcat-8.0.23.exe

►  Install Apache Tomcat 8 as a service

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 29
Environments
Installa9on
Install Tomcat 8

►  Choose the defaults

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 30
Environments
Installa9on
Install Tomcat 8

►  Leave the defaults and provide a user for the administra9on via the web
manager applica9on

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 31
Environments
Installa9on
Install Tomcat 8

►  Choose a JRE, at least Java 7 is required

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 32
Environments
Installa9on
Install Tomcat 8

►  To the des9na9on folder we will refer to as TOMCAT_HOME

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 33
Environments
Installa9on
Install Tomcat 8

►  The service is ini9ally created to be started manually:

▪  This has to be changed to have it start automa9cally at system startup

►  Test the installa9on using h]p://localhost:8080/

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 34
Environments
Installa9on
Deploy the APEX images (/i/) to Tomcat 8

►  Deploy the APEX Images to Tomcat


▪  Copy apex\images => TOMCAT_HOME\webapps\ROOT
▪  Then rename the folder images to i

►  Test the file loca9on using h]p://localhost:8080/i/apex_version.txt

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 35
Environments
Installa9on
Deploy ords.war to Tomcat 8

►  Deploy ords.war to Tomcat


▪  Copy ords.war => TOMCAT_HOME\webapps
▪  The ords.war will be automa9cally deployed and the directory
ords is created

►  Test the setup using h]p://localhost:8080/ords/apex_login

► Now: Viable setup:


▪  Service starts up automa9cally
▪  Connec9on pool op9mized

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 36
Environments
Installa9on
Apache 2.4

► Apache h]p server (h]p://h]pd.apache.org)


▪  Easier to set up on Linux / Unix than on Windows, typically part of the Linux
distribu9ons
▪  Some syntax changes in 2.4:
−  h]p://h]pd.apache.org/docs/trunk/upgrading.html
−  h]ps://www.digitalocean.com/community/tutorials/migra9ng-your-
apache-configura9on-from-2-2-to-2-4-syntax

▪  Typically supports h]ps via ssl out of the box, comes with self signed cer9ficates
included for tes9ng / development purposes
−  For produc9on sites you should a signed cer9ficate
−  Fine for development and tes9ng environments

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 37
Environments
Installa9on
Install Apache 2.4

► Download Apache h]p Server 2.4


▪  h]p://h]pd.apache.org/docs/current/pla~orm/windows.html#down
▪  h]p://www.apachehaus.com/cgi-bin/download.plx

►  Also download the MS Windows libraries (DLL)

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 38
Environments
Installa9on
Install Apache 2.4

► Install the Microsox Visual C++ 2012 Redistributable


▪  vcredist_x86.exe

► Unzip the Apache folder and copy it to c:\Apache24

=> DEFAULT Apache installaMon completed!

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 39
Environments
Installa9on
Configure Apache 2.4

►  What is virtual hos9ng?


▪  Apache supports mu9ple different configura9ons depending on the name and /
or port we talk to the Apache, basically running mul9ple web sites on the same
machine
▪  E.g. at the German Telecom used virtual hosts for different applica9ons
(mul9ple DNS entries for the same ip address):
−  h]p://abit.telekom.de
−  h]p://spots.telekom.de

▪  Every combina9on SERVER-NAME:PORT can possibly be a different virtual host


▪  The setup for SSL / h]ps is also a virtual host

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 40
Environments
Installa9on
Configure Apache 2.4

►  Create a new config file for our APEX setup


▪  copy config file apex.conf to c:\Apache24\conf\apex.conf

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 41
Environments
Installa9on
Configure Apache 2.4

►  Include this configura9on in all RELEVANT virtual hosts


▪  APACHE_HOME\conf\extra\h]pd-vhosts.conf

►  APACHE_HOME\conf\extra\
h]pd-ahssl.conf
(specific to this distribu9on)

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 42
Environments
Installa9on
Configure Apache 2.4

►  Mul9ple includes of the apex.conf will result in the following warning


▪  [Wed Nov 18 08:59:30.234449 2015] [so:warn] [pid 4984:9d 216] AH01574:
module filter_module is already loaded, skipping

►  The warnings can be ignored.

►  You can also move the LoadModule direc9ves into the httpd.conf file
(they are all listed there at the beginning of the file)

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 43
Environments
Installa9on
Configure Apache 2.4

►  Start Apache on the command line


▪  c:\Apache24\bin\h]pd.exe

►  Install Apache as a service


▪  c:\Apache24\bin\h]pd -k install

►  Start Apache Service


▪  net start "Apache2.4"

►  Stop Apache Service


▪  net stop "Apache2.4”

►  Test Apache h]p Server: h]p://localhost/ and h]ps://localhost/

►  Reload the server configura9on (just graceful, no session is lost)


▪  c:\Apache24\bin\h]pd.exe -k restart

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 44
Environments
Installa9on
Configure Apache 2.4

►  Limit Access to Tomcat to Apache via AJP protocol only

►  Bind Tomcat to localhost ONLY, so that only Apache h]pd server is allowed
to talk to it

►  Modify TOMCAT_HOME\conf\server.xml:
<Connector port="8080" protocol="HTTP/1.1"
connec9onTimeout="20000"
address="127.0.0.1"
redirectPort="8443" />
...
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
address="127.0.0.1" />

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 45
Environments
Installa9on
Configure Apache 2.4

►  Verify that caching works


▪  Don’t hit reload => click in the applica9on or click in address bar and hit enter
▪  Probleme mit Google Chrome mit lokaler Test-Instanz => Nicht representa9v!
▪  Firefox => built-in developer tools
▪  The files are only requested ONCE for 8 hrs

►  Verify that compression works

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 46
Environments
Opera9onal Use Cases

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 47
Environments
Opera9onal Use Cases
Change connec9on pool

►  UC#1: Password for APEX_PUBLIC_USER needs to be changed


java –jar ords.war setup advanced

▪  Prompts for all database setup parameters again and UPDATES all config files,
doesn’t create them from scratch

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 48
Environments
Opera9onal Use Cases
Change connec9on pool

▪  Axer the change we need to reload the new configura9on in your Tomcat by
either:
1.  Restart the Tomcat service
2.  “touch” the webapps\ords.war file
−  Update the 9mestamp, Tomcat will automa9cally redeploy

3.  use the Tomcat management interface to reload

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 49
Environments
Opera9onal Use Cases
Change connec9on pool

►  UC#2: Database was moved to a different machine


▪  Modify the config file defaults.xml directly and change the JDBC connect
informa9on
<entry key="db.hostname">localhost</entry>
<entry key="db.port">1521</entry>
<entry key="db.sid">xe</entry>

▪  Reload the new configura9on in your Tomcat as described in UC#1

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 50
Environments
Opera9onal Use Cases
Change connec9on pool

►  UC#3: Debug-Meldungen Browser anzeigen


▪  Modify the config file defaults.xml
<entry key="debug.debugger">true</entry>
<entry key="debug.printDebugToScreen">true</entry>

▪  Reload the new configura9on in your Tomcat as described in UC#1

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 51
Environments
Monitoring

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 52
Environments
Monitoring
Errors / Logfiles

►  Apache h]p server


▪  APACHE_HOME\logs
−  error_log (errors)
−  access_log (who accessed which file and what was the result (h]p return
code (e.g. 404 not found or 200 ok) and the size

►  Tomcat
▪  TOMCAT_HOME\logs
−  catalina.log (includes messages from Tomcat itself but also all J2EE
applica9ons, i.e. ORDS):

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 53
Environments
Monitoring
Errors / Logfiles

►  Je]y doesn’t support AJP


▪  The proxy direc9ves in the apex.conf won’t work with Je]y in standalone mode,
Je]y doesn’t support AJP

►  Account APEX_REST_PUBLIC_USER locked => Download of sta9c images


don’t work
▪  Look into the TOMCAT_HOME\logs\catalina.log file, there you will see errors
like:
▪  22-Jun-2015 10:33:19.359 SEVERE [ajp-nio-8009-exec-13]
oracle.dbtools.common.config.db.DatabasePools.isValid The pool named:
apex_rt is not correctly configured, error: ORA-28000: the account is locked
▪  All configured connec9on pools are also validated at startup when running the
je]y in standalone mode => you will see it on the command line, too

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 54
Environments
Monitoring
Errors / Logfiles

►  Problem displaying sta9c images in APEX 5.0 for workspaces created pre 4.1
▪  Solu9on: Upgrade to apex 5.0.2 or install patch

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 55
Environments
Monitoring
Errors / Logfiles

►  In APEX we can see all errors due to unhandled excep9ons:

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 56
Environments
Monitoring
Performance

►  APEX Monitoring using the APEX Dic9onary Views

SELECT application_id,
page_id,
COUNT (*) AS hits,
COUNT (*) / 60 AS hits_pro_min,
MIN (elapsed_time) AS MIN,
AVG (elapsed_time) AS AVG,
MAX (elapsed_time) AS MAX,
AVG (elapsed_time) * COUNT (*) weight
FROM apex_workspace_activity_log
WHERE view_date > SYSDATE - 1 / 24 / 60 * 60 /* 1 hour */
GROUP BY application_id, page_id
ORDER BY AVG (elapsed_time) * COUNT (*) /* weight */ desc

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 57
Environments
Monitoring
Performance

►  Use browser tools to understand performance issues


▪  All current browsers have integrated developer tools
▪  But there also add-ons like Firebug

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 58
Environments
Advanced Configura9ons

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 59
Environments
Advanced Configura9ons
SSO with MS Windows

SSO with Windows


There are different ways to use SSO in our APEX applica9ons. We shouldn’t use
NTLM anymore since this is a really old protocol and not considered secure any
more.

►  Apache + mod_auth_kerb
▪  Kerberos authen9ca9on with the Windows Ac9ve Directory
▪  h]p://www.apexsolu9ons.de/blog/allgemein/single-sign-on-for-apex-
applica9ons-using-kerberos/

►  SSO with Internet Informa9on Server (IIS)


▪  Here we also do the na9vely integrated NTLM or Kerberos authen9ca9on which
is built into the IIS. Then we use mod_ajp to proxy the requests to the Apache
Tomcat and ORDS.

►  Tomcat 8 + Kerberos/SPNEGO authen9cator


▪  h]ps://community.oracle.com/message/12748733

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 60
Environments
Advanced Configura9ons
REST-style URLs

►  REST-style URLs for accessing your applica9on, e.g.


▪  /home
▪  /customer
▪  /customer/edit/<id>

►  h]p://www.oracle-and-apex.com/human-readable-urls-in-oracle-apex-
part-2/

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 61
Environments
h]p://9nyurl.com/modernappdev12c
ab dem 19.01.2016 geht es los !

6
2
6
3
Q&A
Dietmar Aust
Opal-Consul9ng, Köln

www.opal-consul9ng.de
daust.blogspot.com
dietmar.aust@opal-consul9ng.de

Setting Up the Oracle APEX Listener (Now ORDS) for Production


23.06.2015 Page 64
Environments

You might also like