ActiveX Automation

Automation is the ability of a client to drive or direct a COM object by calling methods or setting properties using one or more interfaces of that object. For example, Microsoft Excel and Word are automation controllers; that is, they are objects that can be controlled by automation.

Automation is simply the execution of a set of commands that set and get properties and call methods using the properties and methods of the generated ActiveX interface classes. Each ActiveX automation library has a corresponding class of the ActiveX automation type library name created as a subclass of the ActiveXAutomation class. This ActiveX library class is the superclass that supports the automation classes within that library.

Each ActiveX automation class has a set of properties and methods created that correspond to the default interfaces for that class.

Creating an instance of the ActiveX automation object in JADE creates the ActiveXAutomation object. An example of an ActiveX automation type library is Microsoft Word 9.0 Object Library, which creates the automation object classes for Word 97.

When JADE initializes a COM object, the first thread in the application must be the last thread that finalizes (un-initializes) the application. Although jade.exe and jadapp.exe do this, JADE applications such as jadrap.exe do not do so. When you run automation objects on the database server and automation is to be performed on the database server, you must ensure that the first thread to initialize COM is the last thread to finalize (un-initialize) it. For example, if two server applications that use an ActiveXAutomation object are started, the first application must run longer than the second application.

Using an automation object in server methods can cause problems, as there is no way to ensure that such server methods are run on a specific thread and to control when those threads are closed down.

In such situations, you could start a server application that does nothing more than start the automation object and that will not close until the database server is closed down. We therefore do not recommend that you run automation objects on the database server, particularly in-process objects (that is, DLLs), as these can interfere with the operation of JADE.