 |
 |
 |
| PL/SQL Cartridge |
 |
| PL/SQL is Oracle Corporation's procedural language extension to SQL, the standard data access language for relational databases. PL/SQL Cartridge provides the environment for developing Web applications as PL/SQL procedures stored in an Oracle database server. The cartridge acts like a bridge from the Web Application Server to these procedures enabling the Web Application Server to connect to Oracle7 database servers and execute the procedures. |
 |
| Advantages: |
 |
| • |
|
Allows multiple cartridges to use the same DAD |
| • |
|
Provides functionality to group one or more cartridges, each with its own configuration values, into an application. |
|
 |
| When you configure the PL/SQL Cartridge, you install packages that help generate HTML pages. These packages define procedures, functions, and data types that you can use in your stored procedures. |
 |
| The PL/SQL Cartridge enables Web users to connect to Oracle7 database servers. In each HTTP request for the PL/SQL Cartridge, the URL specifies the PL/SQL Agent (which contains connection information) and the name of the stored procedure to run. The URL can also contain values for any parameters required by the stored procedure. |
 |
| Before using a PL/SQL Cartridge, you need to load the packages into the database schemas from which you want to run the procedures. The packages define data types, functions, and procedures that are used by the cartridge and you can use some of these in your Web application. The functions and procedures help you generate dynamic HTML pages that contain data retrieved from the database. |
 |
| The packages are designed to be used in two ways, |
| • |
|
Store HTML pages in the database and update the dynamic parts when the page is requested. |
| • |
|
Generate the entire page dynamically from scratch. |
|
 |
| The following events occur when the Web Application Server receives a request. |
| • |
|
The Listener component of the Web Application Server receives the request from a client and determines who should handle it. If the request is for a cartridge, it forwards the request to the Web Request Broker (WRB) |
| • |
|
The WRB routes the request to an available PL/SQL Cartridge. |
| • |
|
The PL/SQL Cartridge retrieves the name of the PL/SQL Agent from the request, and uses the agent's configuration values to determine to which database server to connect and how to set up the PL/SQL client configuration. Any number of PL/SQL Agents, each with different configuration information, can be defined. |
| • |
|
Using the PL/SQL Agent's configuration values, the PL/SQL Cartridge connects to the database, prepares the call parameters, and invokes the procedure in the database. |
| • |
|
The procedure generates the HTML page, which can include dynamic data accessed from tables in the database as well as static data. |
| • |
|
The output from the procedure is returned via the response buffer back to the PL/SQL Cartridge and the client. |
|
 |
| PL/SQL cartridge configuration information |
 |
| Each PL/SQL cartridge is associated with a Database Access Descriptor (DAD), which is a named set of configuration values used for database access. |
 |
| A DAD specifies information such as the database name or the SQL*Net V2 service name, the ORACLE_HOME directory, and NLS configuration information such as language, sort type, and date language. You can also specify username and password information in a DAD. In the event that these are not specified; the user will be prompted to enter a username and password when the URL is invoked. |
| |