Oracle COM Automation Feature in Oracle9i
The Oracle9i COM Automation Feature enables database programs to call and manipulate COM Automation servers, such as Microsoft Office and Visual Basic. It allows server-side programs to drive data and interaction with Windows-based COM clients. The feature provides PL/SQL and Java stored procedure packages that expose a set of application programming interfaces (APIs) to instantiate COM objects, get and set their properties, and invoke their methods. The COM Automation Feature has a variety of uses with Windows productivity applications and pre-built COM components. For example, in Figure 1, a PL/SQL trigger can be used to automatically compile sales data at the end of every month in a Microsoft Excel spreadsheet to be graphed.
Another usage example could involve Java stored procedures sending stock price email alerts to brokerage customers using Microsoft Outlook.
Database programmers can use the COM Automation Feature APIs rom PL/SQL and Java stored procedures, stored functions, and triggers. There are no restrictions as to where the client COM objects can reside. They can be either local to the database server or be remotely accessed via the Distributed Component Object Model (DCOM). The Java functionality, however, does not allow in-process COM Automation Servers to be used. Java developers can utilize dllhost to support in-process servers as out-of-process servers.
The Oracle COM Automation Feature acts as a generic wrapper around the OLE Automation interface, IDispatch. It externalizes all the methods the IDispatch interface supports. When the COM Automation Feature is invoked from PL/SQL or Java, it converts the passed parameters from its Oracle datatypes to the appropriate COM Automation datatypes. It then invokes the corresponding IDispatch interfaces with the converted parameters.
The Oracle COM Automation Feature provides a package of PL/SQL APIs, ORDCOM, for manipulating COM objects. These APIs are implemented as external procedures in a dynamic linked library (DLL) called orawpcom.dll.
Oracle supports external procedures that enable developers to call Third Generation Language (3GL) functions from server-based object type methods and stored procedures. External procedures are invoked exactly like standard PL/SQL. However, unlike standard PL/SQL 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. You can invoke Oracle COM Automation Feature APIs in the same manner as if you are calling standard PL/SQL.
Java support in the Oracle COM Automation Feature is implemented by the Java Native Interface (JNI). The architecture's key components are the Automation class and the Java COM Proxy DLL, orawcom.dll. The Automation class, a Java proxy to COM Automation servers, provides the methods necessary for developers to manipulate COM objects through the IDispatch interface. The Java-specific COM proxy orawcom.dll enables Java functions to invoke their corresponding COM functions.
The Oracle COM Automation Feature carries many benefits for Windows applications users:
500 Oracle Parkway
Redwood Shores, CA 94065
© Oracle Corporation 2001
All Rights Reserved
This document is provided for informational purposes only, and the information herein is subject to change without notice. Please report any errors herein to Oracle Corporation. Oracle Corporation does not provide any warranties covering and specifically disclaims any liability in connection with this document.
Oracle, Oracle9i, and PL/SQL are a trademarks of Oracle Corporation.
All other company and product names mentioned are used for identification purposes only and may be trademarks of their respective owners.