![]() |
Oracle
COM Automation Developer's Guide
Release 8.1.5 for Windows NT A68012-01 |
|
This chapter describes the Oracle COM Automation feature
Software Development Kit (SDK) and provides an overview of the product.
Read this chapter before installing or using Oracle COM Automation
feature.
Specific topics discussed are:
Component software has recently been promoted as the next
evolution in software development. The growth of object-oriented programming
and distributed objects are proof of this industry-wide trend. The scripting
of components enables you to reuse code that is pre-built and pre-tested.
The reuse of code fulfills one of the key objectives of software development:
shorter development cycles and reduced time to market. COM is the ubiquitous
technology to promote componentization and reuse of software for Windows-based
systems.
Oracle COM Automation feature has been created to enable
you to use COM-based components to customize and enhance the functionality
of the Oracle8i database database on Windows NT.
Oracle COM Automation feature enables PL/SQL developers to
programmatically manipulate COM objects through the OLE Automation interface
(IDispatch).
The feature provides a PL/SQL package and exposes a set of
application programming interfaces (APIs) to instantiate COM objects, get
and set their properties, and invoke their methods. PL/SQL developers can
call these APIs from PL/SQL subprograms, stored procedures, stored functions,
or triggers to manipulate COM objects. There are no restrictions as to
where the COM objects can reside. They can be either local to the database
server or be accessed remotely through the Distributed Component Object
Model (DCOM).
OLE Automation is the most common and basic mechanism for
third-generation language (3GL) and fourth-generation language (4GL) programs
to manipulate COM objects. Most COM objects support OLE Automation and
the major 4GL programming environments, such as Powersoft PowerBuilder
and Microsoft Visual Basic. OLE Automation is the mechanism for scripting
COM objects.
Oracle COM Automation feature is a powerful and enabling infrastructure technology for Oracle developers on Windows NT. The feature provides four compelling benefits for developers who are creating and deploying Oracle solutions on Windows NT:
Oracle COM Automation feature provides a PL/SQL package of
APIs for manipulating COM objects. These APIs are implemented as external
procedures in a dynamic linked library (DLL).
Oracle8 release 8.0.3 was the first release of the database
to support external procedures. External procedures enable developers to
call 3GL functions from server-based object type methods and stored procedures.
External procedures are invoked exactly like standard PL/SQL stored
procedures. However, unlike standard PL/SQL procedures where the body of
the procedure is written in PL/SQL and stored in the database, external
procedures are C functions that reside within a DLL. Therefore, you can
invoke Oracle COM Automation feature APIs in the same manner as if you
are calling a standard PL/SQL stored procedure or function.
This figure illustrates the interaction between an Oracle
database, Oracle COM Automation feature, and external procedures:
The Oracle database invokes any of the OLE Automation external procedure APIs as follows:
This figure shows an Oracle8i database invoking OLE
Automation external procedure APIs.
The dependence on external procedures by Oracle COM Automation
feature has implications for the availability of the Oracle database and
the performance of Oracle COM Automation feature.
You do not jeopardize the availability of the Oracle database
by using Oracle COM Automation feature and custom or third-party COM objects
in a production environment. Oracle COM Automation feature operates outside
of the Oracle kernel's address space. This safeguards the Oracle kernel
from COM objects that crash unexpectedly.
Currently, there are two architectural models in which an
external procedure can be invoked. The model used directly affects the
performance of Oracle COM Automation feature. In this release, you can
choose Architectural Model 1 or Architectural Model 2.