Oracle Application Server 10g Migrating from Oracle Application Server 10g (9.0.4) Part Number B10424-01 |
|
This chapter compares Oracle Application Server cartridge functionality to corresponding functionality in Oracle Application Server 10g, and discusses considerations for migrating cartridges to Oracle Application Server 10g.
Topics discussed are:
Table 3-1 presents the equivalent Oracle Application Server cartridge types and their Oracle Application Server 10g components.
The migration strategy for each application cartridge is detailed in the sections below.
Note: Oracle Application Server uses Perl version 5.004_01, while Oracle Application Server 10g uses Perl version 5.6.1. When code modification is required, use the appropriate Perl version. |
You can migrate Oracle Application Server PL/SQL cartridge applications to Oracle Application Server 10g mod_plsql
. Both mod_plsql
and PL/SQL cartridge applications provide similar support for building and deploying PL/SQL-based applications on the Web.
mod_plsql
runs as an Oracle HTTP Server module. It delegates the servicing of HTTP requests to PL/SQL programs, which execute their logic inside Oracle databases.
See Also:
Oracle Application Server 10g mod_plsql User's Guide if you are planning to migrate PL/SQL applications from Oracle Application Server to Oracle Application Server 10g. |
Support for several Oracle Application Server PL/SQL cartridge features has changed in Oracle Application Server 10g PL/SQL. The rest of this section provides details on how to migrate Oracle Application Server applications that use these features.
Table 3-2 summarizes the file upload and download features supported by Oracle Application Server and Oracle Application Server 10g.
Oracle Application Server PL/SQL cartridge and Oracle Application Server 10g mod_plsql
both support uploading files. However, they use different document table schemas. Table 3-3 shows how the columns in the Oracle Application Server 10g document table derive their values from Oracle Application Server.
The content from Oracle Application Server is always be stored in the BLOB_CONTENT
column of the Oracle Application Server 10g document table. The tool also ensures that the data loaded into the Oracle Application Server 10g document
table is always uncompressed data. To do this, if the data is compressed (this is verified by checking the entries in the OWS_ATTRIBUTES
table), the data is uncompressed using the zlib
library, and then loaded to the document table in Oracle Application Server 10g.
Custom authentication is used in Oracle Application Server for applications that want to control the access themselves (that is within the application itself). The application authenticates the users in its own level and not within the database level.
mod_plsql
also supports custom authentication.
The flexible parameter passing scheme enables you to overload PL/SQL procedures. This allows you to reuse the same procedure name but change the procedure's behavior depending on how many parameters a form passes to the procedure.
Both Oracle Application Server and Oracle Application Server 10g support flexible parameter passing. To use flexible parameter passing in the mod_plsql
, prefix the procedure name with an exclamation point (!) in the invoking URL.
For example, if the following URL invokes your Oracle Application Server procedure:
http://host/virtual_path/procedure?x=1&y=2
Then the URL that invokes your mod_plsql
procedure will be:
http://host/virtual_path/!procedure?x=1&y=2
Oracle Application Server PL/SQL cartridge supports a positional parameter passing scheme. This feature is not supported in Oracle Application Server 10g and cannot be used.
In addition to running PL/SQL procedures stored in the database, the Oracle Application Server PL/SQL cartridge can run PL/SQL source files from the file system. The source file contains an anonymous PL/SQL block that does not define a function or procedure. This feature enables users to execute PL/SQL statements without storing them in the database. This is useful when prototyping PL/SQL code since it saves having to reload procedures into the database each time they are edited.
Oracle Application Server 10g does not support this feature. You must assign names to the anonymous blocks and compile them as stored procedures in the database.
This section explains how Perl cartridge applications are implemented in the Oracle Application Server, and how you can migrate them to Oracle Application Server 10g. Topics include:
There are two types of Perl applications that can run under Oracle Application Server:
Perl scripts that run under Oracle Application Server as CGI scripts use a standard Perl interpreter that must be installed on the system as a Perl executable, separate from the Oracle Application Server installation.
Perl scripts that run under Oracle Application Server using the Perl cartridge use a Perl interpreter contained in the cartridge, and based on standard Perl version 5.004_01. The interpreter is built as the following:
The Perl cartridge links with the shared object or library at runtime.
Scripts written for the Perl cartridge differ from scripts written for a CGI environment, because of how the cartridge runs the interpreter. The Perl cartridge
stdin
and stdout
to the WRB client input/output (for example, the browser).
stderr
to the WRB logger.
You can run your Perl scripts developed for Oracle Application Server under the CGI environment in Oracle Application Server 10g CGI environment, as well, after modifying the interpreter line of your Perl scripts. You may also modify your Perl scripts for Perl cartridge in Oracle Application Server in order to run under Oracle Application Server 10g.
This section discusses Oracle Application Server and Oracle Application Server 10g Perl implementations, and code modifications for migrating Perl scripts to Oracle Application Server 10g.
Oracle Application Server 10g Perl environment is based on mod_perl
. Like Oracle Application Server implementation, mod_perl
provides a persistent Perl interpreter embedded in the server and a code caching feature that loads and compiles modules and scripts only once, serving them from the cache. Like the Oracle Application Server Perl cartridge, mod_perl
redirects stdout
to the listener.
Table 3-4 presents comparisons of the third party Perl modules associated with both Oracle Application Server and Oracle Application Server 10g. In order to migrate applications that use these modules from Oracle Application Server to Oracle Application Server 10g, you must acquire these modules and install them. The files are available from:
http://www.cpan.org
The following points should be noted between the Oracle Application Server Perl cartridge and mod_perl
in Oracle Application Server 10g.
Both Oracle Application Server and Oracle Application Server 10g cache compiled Perl scripts. If not properly handled, the caching of multiple Perl scripts can lead to namespace collisions. To avoid this, both Oracle Application Server and Oracle Application Server 10g translate the Perl script file name into a unique packaging name, and then compile the code into the package using eval
. The script is then available to the Perl application in compiled form, as a subroutine in the unique package name.
Oracle Application Server and Oracle Application Server 10g form the package name differently. Oracle Application Server cannot cache subroutines with the same name. Oracle Application Server 10g creates the package name by prepending Apache::ROOT::
and the path of the URL (substituting "::"
for "/
").
Oracle Application Server Perl scripts that use cgi-lib.pl
must be modified to use a version of the library customized for the Perl cartridge. This is not necessary for Oracle Application Server 10g.
Oracle Application Server Perl scripts may contain instructions that need not be executed repetitively for each request of the script. Performance improves if these instructions are run only once, and only the necessary portion is run for each request of the Perl script.
In Oracle Application Server, perlinit.pl
pre-loads modules and performs initial tasks. This file is executed only once when the cartridge instance starts up. By default, there are no executable statements in this file. This file is specified by the initialization script parameter in the Perl cartridge Configuration form.
The corresponding pre-load script for Oracle Application Server 10g is startup.pl
.
See Also:
|
In Oracle Application Server, you can generate dynamic content using the LiveHTML cartridge by embedding Server-Side Includes (SSI) and scripts in HTML pages, or by using Perl for scripting. If you are migrating LiveHTML applications to Oracle Application Server 10g, you must migrate LiveHTML SSI to Apache SSI. Currently the only equivalent to LiveHTML embedded scripts in Oracle Application Server 10g is JSP.
Table 3-5 lists the SSIs available in Apache and LiveHTML.
Apache SSIs | LiveHTML SSIs |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
not available |
|
not available |
not available |
|
The syntax for specifying an SSI in Apache or LiveHTML is the same. For example:
<!--#config sizefmt="bytes" -->
SSI in Apache is implemented by the mod_include
module. This module is compiled into Oracle HTTP Server by default.
In addition to the elements shown in the table above, Apache SSI also includes variable substitution and flow control elements.
In Oracle Application Server, you can use the LiveHTML cartridge to embed Perl scripts in HTML files. There is no equivalent functionality in Oracle Application Server 10g. However, you have the following choices to do so.
mod_perl
, for example, you can change the HTML piece to printf()
.
http://perl.apache.org
.
The tools run on top of
Note:
mod_perl
. Therefore, this migration approach is the easiest, comparing to other three approaches listed in this section.
See Also:
Oracle Application Server Containers for J2EE Support for JavaServer Pages Developer's Guide |
In Oracle Application Server, you can use the CWeb cartridge to
The migration paths from Oracle Application Server CWeb cartridges to Oracle Application Server 10g include
CWeb cartridge is essentially a .dll
or a .so
library. You can integrate it into the Oracle Application Server environment by specifying the entry point of this library in an administration page and map it to a Web URL. The Oracle Application Server infrastructure invokes the entry point of the library (CWeb cartridge) when a browser requests that URL. In addition, the CWEB cartridge makes several API from the WRB infrastructure available to access the client information, and other environment information.
CGI is a standard supported by all Web servers, including Oracle Application Server 10g. When a URL that maps to the "CGI program" is accessed, the Web server starts that program and return its results to the browser.
Therefore, one simple way to migrate CWeb is to write a simple C program that invokes the entry point of the CWeb cartridge during the start-up.
The WRB API and other Oracle Application Server infrastructure dependencies will, of course, not be available in the new Oracle Application Server 10g environment. If these WRB API or capabilities were used, the CWeb cartridge must be modified to use alternative API.
From an infrastructure standpoint, the CWeb cartridges were load balanced. New instances were not started on each request.
FastCGI is an "overloaded" term referring to the specifications, protocol, API, and also the implementation. In summary, it spawns a separate process and keeps it alive and independent of the life-style of the requests. FastCGI programs must conform to certain standards for starting point and events to listen to, which is similar to a Java servlet specification. Their life-cycle can, then, be controlled by the infrastructure.
Migrating a CWeb cartridge is similar to writing a FastCGI program, which conforms to the specifications, and in turn calls the entry point of the CWeb cartridge.
See Also:
|
If you used CWeb to create custom cartridges, you can also consider creating a custom Oracle Application Server 10g module.
If you use CWeb to invoke C programs, you have the following options:
|
![]() Copyright © 2002, 2003 Oracle Corporation. All Rights Reserved. |
|