2 Understanding COM Interoperability

This chapter contains the following topics:

2.1 COM Interoperability

COM enables developers to build systems by assembling reusable components from different vendors. COM provides logic and data sharing among disparate applications. COM is a binary interoperability specification and communication convention for software components. It is a single-vendor technology that is available on Microsoft platforms only. Since most independent software components are also self-contained, they are frequently called objects or servers.

Being a binary specification, COM is inherently independent of programming languages. Unlike software libraries or DLLs, which are compiled to specific language or linkage conventions, COM-based software components are created ready to work with any COM client. For example, a Visual C++ application can use COM objects created in Visual Basic, or a VBScript within an intranet web page to control a COM object written in MicroFocus COBOL.

The COM connector provides these two types of services on the JD Edwards EnterpriseOne server:

  • Business function execution.

    These chapters discuss business function execution:

    • Understanding JD Edwards EnterpriseOne COM Server.

    • Deploying the COM Server for Business Functions.

    • Using COM Transactions.

  • Asynchronous event notifications and introspection operations.

    The chapter, Using COM Connector Events - Guaranteed Events, discusses event notifications and introspection operations.

The COM connector provides a mechanism for running business functions on the JD Edwards EnterpriseOne server. You use the GenCOM utility on the Microsoft Windows client to generate wrappers for business function objects. The wrappers can be deployed on any machine. You can develop application code for the generated wrappers using Visual Basic (VB) or C++. Once the objects change in the package, the connector communicates with the JD Edwards EnterpriseOne server for login, logoff, transactions, and for each business function execution call. Distributed Component Object Model (DCOM) enables COM objects in a distributed environment. COM+ transactions enables COM applications and third-party applications to take part in distributed transactions.

The COM connector supports subscribe and publish functionality for JD Edwards EnterpriseOne events.

2.2 JD Edwards EnterpriseOne COM Interoperability

This section discusses:

  • COM objects

  • COM interoperability usage

2.2.1 COM Objects

Using COM, JD Edwards EnterpriseOne exposes all master and major business functions through the interface definition language (IDL) standard. A business function is a logical collection of C functions and their associated data structures grouped together to produce a unit of work. With COM, JD Edwards EnterpriseOne can pass logic and data requests to other applications using COM wrappers. COM objects are wrappers around these business functions and data structures. These wrappers provide common interoperability methods across dissimilar systems. A wrapper is attached to each master and major business function and provides stubs for third-party applications to access.

The interface provided by the COM wrappers has a one-to-one correspondence with the business functions. For example, if within the system library a business function named B550001 exists, and within this business function two C functions, named foo1 and foo2 exist with data structures for each function, named DS1 and DS2, the corresponding COM object would be:

 Interface IDS1
{
}
Interface IDS2
{
}
 Interface IB550001
{
  HRESULT foo1 {IDS1 * param, IConnector* conn, long accessNumber);
    HRESULT foo2 (IDS2 * param, IConnector* conn, long accessNumber);
}
Their associated program IDs (ProgID) would be:
IDS1  - DS1.jdeDS1.1
IDS2  - DS2.jdeDS2.1
IB550001 - B550001.jdeB550001.1

2.2.2 COM Interoperability Usage

This illustration shows how the COM interoperability solution for business function execution typically flows:

Figure 2-1 COM interoperability solution for business function execution

Description of Figure 2-1 follows
Description of "Figure 2-1 COM interoperability solution for business function execution"

  1. The administrator generates the COM wrappers.

  2. The administrator deploys the COM objects to the COM server.

  3. The COM server enables communication with the application server so that the generated COM objects can be used in applications.

  4. The COM objects are configured to communicate with the application server once the COM objects are on the COM server.

  5. The DLLs or IDLs from the generated COM objects are copied so that developers can use them.

  6. The application developers create the applications.

  7. The applications communicate with the COM server.

This illustration shows how the COM interoperability solution for event notification and introspection typically flows:

Figure 2-2 COM interoperability solution — event notification and introspection

Description of Figure 2-2 follows
Description of "Figure 2-2 COM interoperability solution — event notification and introspection"

  1. Install a JD Edwards EnterpriseOne client.

  2. Configure the COM connector.

  3. COM connector enables communications with JD Edwards EnterpriseOne so that clients can introspect and subscribe to events.

  4. Applications developer creates applications to subscribe to and receive events.