| Oracle® Application Express Listener Installation and Developer Guide Release 1.1 Part Number E21058-01 |
|
|
View PDF · Mobipocket |
This section explains how to use Oracle Application Express Listener Administration to configure Oracle Application Express Listener. It describes how to set up a database connection, configure security, define file caching, create pre and post processing procedures, and perform other tasks.
Oracle Application Express Listener Administration enables you to configure Oracle Application Express Listener. Note that some of the URLs listed in the section require the user have a specified role. To learn more, see the section for creating users and roles for your application server in "Installing Oracle Application Express Listener".
To access Oracle Application Express Listener Administration initially, enter the following URL in your Web browser:
http://<host>:<port>/apex/listenerConfigure
Once you have completed the configuration process, use the following URL to access Oracle Application Express Listener Administration:
In your Web browser, enter the following URL:
http://<host>:<port>/apex/listenerAdmin
When prompted, enter your credentials.
Note that in order to log in using this URL, a user must have the Admin role.
This section describes the Oracle Application Express Listener Administration user interface which is separated into six categories:
Connection - See "Establishing a Database Connection".
Security - "Configuring Security".
Caching - "Defining Caching".
Pre-Post Processing - "Creating Pre- Post Processing Procedures".
Status - "Viewing Status".
Miscellaneous - "Configuring Miscellaneous Options".
Tip:
Every category (or tab) has an Apply button. Every time you click Apply, Oracle Application Express Listener Administration saves the information and returns you to the defined default Web page. If you need to update information on multiple tabs, make all your updates and then click Apply.Use the Connection tab to enter database credentials. Key elements of this page include:
Username - Defines the name of the database user for the connection.
Password - Defines the password of the specified database user.
Connection Type - Select Basic, TNS, or Advanced. The fields that display depend on the type selected.
Note that Username, Connection Type, Port, and SID contain default values.
To configure a basic database connection:
Click the Connection tab.
For Username, enter the name of the database user for the connection.
For Password, enter the password of the specified database user.
For Connection Type, select Basic.
Specify the following:
Hostname - Enter host system for the Oracle database.
Port - Enter the database listener port.
Select one of the following:
SID - Enter the name of the database.
Service name - Network service name of the database.
Click Apply.
To configure a TNS database connection:
Click the Connection tab.
For Username, enter the name of the database user for the connection.
For Password, enter the password of the specified database user.
For Connection Type, select TNS.
Specify the following:
TNS Alias Name - The TNS alias name must match the name in the tnsnames.ora file.
TNS Directory - The directory location of your tnsnames.ora file.
If you define the environment variables TNS_ADMIN or ORACLE_HOME, then the listener checks if the file, tnsnames.ora, exists in either the TNS_ADMIN directory or [ORACLE_HOME]/NETWORK/ADMIN directory. If the file exists, then the TNS Directory will contain the default directory location. Otherwise, the user required to specify the TNS Directory.
Click Apply.
You can specify a custom JDBC URL to connect to the database by selecting the Connection Type, Advanced on the Connection tab.
To configure an Advanced database connection:
Click the Connection tab.
For Username, enter the name of the database user for the connection.
For Password, enter the password of the specified database user.
For Connection Type, select Advanced.
The Custom JDBC URL field displays.
In Custom JDBC URL, enter a custom URL.
You can specify different formats for the custom JDBC URL. Consider the following examples:
SID:
jdbc:oracle:thin:<host>:<port>:<sid>
Example:
jdbc:oracle:thin:myhost:1521:orcl jdbc:oracle:oci8:myhost:1521:orcl
Service name:
jdbc:oracle:thin:@//<host>:<port>/<servicename>
Example:
jdbc:oracle:thin:@//myhost:1521/orcl.us.oracle.com
Oracle Net keyword-value pair:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=myservicename.com)))
Click Apply.
See Also:
Oracle Database Net Services Administrator's Guide for more information about connection formats.Use the JDBC Settings section of the Connection tab to configure JDBC option.
Click the Connection tab.
For Username, enter the name of the database user for the connection.
For Password, enter the password of the specified database user.
For Connection Type, select a connection type.
To expand the JDBC Settings heading, click JDBC Settings.
Specify the following:
JDBC Driver Type - Select either thin or oci8.
Initial Pool Size - Specify the initial pool size for the number of connections that will be created.
Minimum Connections - Define the minimum number of connections.
Maximum Connections - Specify the maximum number of connections.
Maximum Statements - Define the maximum number of statements to cache for each connection.
Inactivity Timeout - Indicate how long (in seconds) an available connection can remain idle before it is closed.
Abandoned Connection Timeout - Determine how long a borrowed (in use) connection can remain unused (in seconds) before it is considered as abandoned and reclaimed.
Click Apply.
Tip:
Except for the JDBC Driver type, JDBC options can also be changed during run timeUse the Security tab to validate procedure requests and determine if a user is allowed to access the procedure. Click each section heading to expose the content.
Use Allowed Procedures to specify procedures, packages, or schema names that can be executed from the Web browser.
To specify Allowed Procedures:
Click the Security tab.
Click Allowed Procedures to expand or hide the content.
In Inclusion list, enter the procedure name or procedure patterns separated by commas.

Note that the wildcard characters asterisk (*) and question mark (?) are supported. Use an asterisk (*) to substitute zero or more characters and a question mark (?) to substitute for any one character.
If the Inclusion list field is left blank, then the Oracle Application Express Listener does not validate the procedure names to determine if the procedure is allowed for processing.
Click Apply.
Tip:
The advantage of using Allowed Procedures is that the procedure names and procedure patterns are stored in the Oracle Application Express Listener, whereas invoking the Database Validation Function requires a database round-trip.Use Blocked Procedures to specify procedures, packages, or schema names that cannot be executed from the Web browser.
To specify Blocked Procedures:
Click the Security tab.
Click Blocked Procedures to expand or hide the content.
In Inclusion list, enter the procedure name or procedure patterns separated by commas.

Note that the wildcard characters asterisk (*) and question mark (?) are supported. Use an asterisk (*) to substitute zero or more characters and a question mark (?) to substitute for any one character.
If the Exclusion list field is left blank, then the Oracle Application Express Listener does not validate the procedure names to determine if the procedure is allowed for processing.
To disable this feature, select Disable Default Internal Exclusion List. See "About the Internal Exclusion List".
Click Apply.
The Oracle Application Express Listener includes an internal exclusion list which blocks users from accessing the following:
sys.*, dbms_*, utl_*, owa_*, owa.*, htp.*, htf.*, wpg_docload.*
This option enables you to disable the default internal exclusion list, however, Oracle does not recommend this approach. Instead, Oracle recommends using the external exclusion list solely for debugging purposes.
Use Database Validation Function to determine if the requested procedure in the URL should be allowed for processing. Oracle Application Express Listener executes the validation function you specify for each requested procedure, or checks the security cache to determine if a procedure is valid or invalid. To learn more, see "About Security Settings".
To specify a Database Validation Function:
Click the Security tab.
Click Database Validation Function to expand or hide the section.
In the field provided, enter the name of the Database Validation Function.

The validation function you specify is a stored function that resides in the database. If the validation function you specify does not exist, an error message displays.
The validation function returns true if the procedure is allowed for processing. Otherwise, it returns false.
If the Validation Functions field is left blank, then Oracle Application Express Listener does not validate the procedure name to determine if the procedure should be allowed for processing.
Click Apply.
The validation function must return a boolean and have one argument for the procedure name. Consider the following example:
CREATE OR REPLACE
FUNCTION CHECK_VALID_PROCEDURE (Procedure_Name IN VARCHAR2) RETURN BOOLEAN AS
BEGIN
IF (UPPER(Procedure_Name) LIKE ('CUST%')) THEN
RETURN true;
ELSE
RETURN false;
END IF;
END CHECK_VALID_PROCEDURE;
When you specify a Database Validation Function, Oracle Application Express Listener uses the Security Cache to cache the procedures names and determine if they are valid or invalid. Using a caching mechanism, reduces the number of database round-trips needed to execute the above Validation Function.
To specify Security Settings:
Click the Security tab.
Click Security Settings to expand or hide the content.

Specify the following:
Maximum Cache Entries - Specify the maximum cache size.
When the maximum entries have been reached, the older (or stale) procedure name that was least recently used is removed from the cache and a new procedure name is added to the cache.
Total Cache Entries - Displays the total number of procedure names that are valid or invalid in the Security Cache.
Clear Cache - If the total cache entries is greater than zero, then the Clear Cache button displays, enabling you to delete the cache entries.
As a best practice, clear the cache whenever a Database Validation Function is updated.
Click Apply.
If the user enters data for Allowed Procedures, a Database Validation Function, or Blocked Procedures, the Oracle Application Express Listener determines if the entered procedure name is valid by checking the security information in the following order:
Database Validation Function - Checks if the procedure name is valid.
Allowed Procedures - Checks if the procedure name is in the inclusion list.
Blocked Procedures - Checks if the procedure is NOT in the exclusion list.
If these validations pass, then the procedure is valid for processing.
The Oracle Application Express Listener enables you to cache file-based content for quick access. Caching is only enabled if you specify the procedure names.
To specify procedure names to allow the caching of files:
Click the Caching tab.
The Cache Files page appears.

Specify the following:
| Option | Description |
|---|---|
| Procedure Name | Specify the procedure names to allow for caching of their files.
The procedure names can contain the wildcard characters asterisk ( Separate multiple procedures with a comma, for example: p, wwv_flow_file*, download_my_file |
| Keep most recently used files | If selected, files that are most recently used will remain in the cache. |
| Maximum entries | Specify the maximum number of files to cache. When the maximum entries have been reached, the older files are removed from the cache when a new file is added. |
| Keep files for the specified duration | If selected, files that are cached expire after the specified length of time. |
| Expires after | Specify the length of time after the files expire. Note the selected value must be a numeric value greater than 0. |
| duration | Select the amount of time from the list. Options include: days, hours, or minutes. |
Tip:
Once you specify a Procedure Name, the Keep files for the specified duration and Keep most recently used files button are enabled.To configure Cache Settings, click Cache Settings.

Specify the following Cache Settings options:
Total Cache Entries - Displays the total number of files that are cached.
Clear Cache - If the total cache entries is greater than zero, then the Clear Cache button displays, enabling you to delete the cache entries.
Directory - Specify the directory location for the cache files.
Click Apply.
Click the Pre-Post Procedures tab to specify database procedures to invoke before or after executing the procedure specified on the URL.
Click Pre-Processing to expand or hide this section. In Procedure Names, enter the procedure names to execute after executing the procedure specified on the URL and click Apply. Separate multiple procedure names with a comma.

Oracle Application Express Listener executes the procedures in the order specified in the Procedure Names field (for example, proc1, proc2, . . . , procN).
Click Post-Processing to expand or hide this section. In Procedure Names, enter the procedure names to execute after executing the procedure specified on the URL and click Apply. Separate multiple procedure names with a comma.

Oracle Application Express Listener executes the procedures in the order specified in the Procedure Names field (for example, proc1, proc2, . . . , procN).
Click the Status tab to view statistics, error tracking, and logging information.
Tip:
Users with the manager role only see the Status tab.Click Statistics to expand or hide this section.
Statistics displays the following Oracle Application Express Listener information:
Server uptime.
Total accesses, total traffic, total errors, total file downloads, and total processing time.
Processing time in milliseconds for minimum, average, median, and maximum.
Database time in milliseconds for minimum, average, median, and maximum.
Active requests.
Active and available connections in the pool.
Security enabled or disabled, and its cache entries and maximum entries.
Cache file enabled or disabled, and its cache entries and maximum entries.

Click Error Tracking to expand or hide recent error message. Message display in descending order. Error Tracking provides the total number of errors, date, time, and elapsed time for each error message.
Click Logging to expand or hide the log of the different types of activities that occur in the Oracle Application Express Listener. The log includes activities such as adding a procedure to the cache, finding a procedure in the cache, or reloading a procedure. The log displays the database time and processing time in milliseconds for that procedure.
The Miscellaneous tab provides various configuration options, including specifying the default Web page, enabling the different types of error reporting, and whether to clear logging.
To specify options on the Miscellaneous tab:
Click the Miscellaneous tab.
The Miscellaneous tab appears.

Specify the following options.
Under Error Reporting:
Default Web Page - Specify the default page to display (for example, apex).
Show debug messages on console - Select this option to display debugging messages on the application server console.
Show error messages on browser - Select this option to display error messages on the browser.
Keep most recent error messages - Select this option to retain the error messages.
Maximum Error Entries - Specify the total number of error messages to retain.
Total Error Entries - If the total error entries is greater than zero, then the Clear Cache button is enabled. Click the Clear Cache button to delete the error entries.
Under Logging:
Keep most recent log messages - Select this option to retain log messages.
Maximum Log Entries - Specify the total number of error messages to retain.
Total Log Entries - If the total log entries is greater than zero, then the Clear Cache button is enabled. Click the Clear Cache button to delete log entries.
Click Apply.
If the Oracle Application Express Listener detects missing data or incorrect information, then an error message displays. When saved, the data is written to the Oracle Application Express Listener configuration file and the specified default Web page appears.
See Also:
"About the Configuration File"