Overview


The interceptor of TIBCO Adapter for COM is similar to a COM proxy. In other words, when a client tries to create an instance of a COM coclass and obtain an interface pointer to it, a proxy is returned to the client. This proxy is an interface pointer with a virtual function table (vtable) containing entries that point not to individual method implementations, but rather to generic interception code.

The client uses this proxy as if it were the real interface pointer. However, when the client makes calls to the proxy's virtual functions, the vtable reroutes these calls to the generic interception code. This interception code then marshals the method parameters into a TIBCO ActiveEnterprise message and transmits this message over TIBCO Rendezvous.

The mechanism through which the interceptor is activated and a proxy is returned to the client is the TIBCO moniker. The client creates an object using the TIBCO moniker-based syntax.

A moniker is an intelligent class factory used to produce an instance of (or a proxy for) another object. A general description of COM monikers is beyond the scope of this document. For more information on monikers, consult MSDN or an introductory text on COM/DCOM.

Display String Format

The display string of a TIBCO moniker, discussed in more detail in the next section, is divided into two parts by a colon ( : ). The first part consists of the string tibco or tibcos. The second part is divided by vertical bars ( | ) into three required fields and two optional fields, which must appear in the sequence shown here. Thus, the correct format for the display string of a TIBCO moniker is:

tibco:<repository_instance_identifier>|<adapter_instance_identifie
r>|<programmatic_identifier><|<override_endpoint>|<properties_file
path>> 

or

tibcos:<repository_instance_identifier>|<adapter_instance_identifi
er>|<programmatic_identifier><|<override_endpoint>|<properties_fil
epath>> 
The tibco form is used to activate the .dll implementation of the interceptor component. The tibcos form is used to activate the Microsoft Windows Service implementation of the interceptor component. For more information on the different uses of these two implementations of the interceptor component, see Components.
 

Example

An example of a display string for a TIBCO moniker is:

tibco:tibcr://sample|Adapter for COM/Interceptor 
Instances/TIBCOCOMInterceptor1|Operation2.Testobj1|Operation2.Test
obj1.1.OverrideClient 

Parts of the Display String

The components of the display string are discussed in this section.

Part 1

The first part of a moniker display string always identifies the kind of moniker the COM runtime should activate. In this case, the string tibco (or tibcos) tells the COM runtime that it should activate a TIBCO moniker (or a TIBCO class factory that will return an interceptor proxy).

Part 2

The second part contains the information the COM runtime is to pass to the TIBCO moniker to tell it how to create the proxy. This information consists of the following items, which must be entered in the command line in sequence.

Repository Instance Identifier

The Repository Instance Identifier identifies which repository instance contains the configuration information for the interceptor proxy. This identifier takes one of two forms depending on the type of repository the interceptor is using:

Adapter Instance Identifier

The Adapter Instance Identifier identifies which adapter configuration instance inside the repository contains the configuration information to be used by the interceptor proxy. When you open a repository instance inside TIBCO Designer, you might see the following tree:

In this case, the Adapter Instance Identifier comprises the nodes:

These nodes are concatenated as a file path:

Adapter for COM/Interceptor Instances/TIBCOCOMInterceptor1
You must use a forward slash (/) when you specify the configurl for the TestInterceptor, in the Adapter Properties file.
 

Programmatic Identifier

The Programmatic Identifier is a COM programmatic identifier (progid) used to identify the COM coclass for which you want to create a proxy.

Override endpoint (optional)

Override endpoint allows you to bind an interceptor to a specific endpoint (RequestResponseInvocationServiceEndpoint or PublicationServiceEndpoint) at runtime. The endpoint must be present in the adapter configuration instance in the repository. It is a good practice to explicitly specify the OverrideEndpoint in the moniker display name.

When the repository contains multiple endpoints that are associated with the same TIBCO ActiveEnterprise class, and if the OverrideEndpoint is not explicitly specified in the moniker display name, the interceptor will choose the first suitable endpoint it finds in the repository. That endpoint may not be the one you intend.

Example 1

In this example, you:

In this example, you can use either of the following two moniker display names at runtime:

tibco:c:\tibco\adapter\adcom\5.3\examples\sample.dat|Adapter for 
COM/Interceptor 
Instances/TIBCOCOMInterceptor1|Operation2.Testobj2|Operation2.Test
obj2.1.Publisher 

or

tibco:c:\tibco\adapter\adcom\5.3\examples\sample.dat|Adapter for 
COM/Interceptor 
Instances/TIBCOCOMInterceptor1|Operation2.Testobj2|Operation2.Test
obj2.1.OverridePublisher 

If you use the first moniker display name, the interceptor will be bound to the Operation2.Testobj2.1.Publisher endpoint. If you use the second moniker display name, the interceptor will be bound to the Operation2.Testobj2.1.OverridePublisher endpoint.

Example 2

If the following changes are made to the previous example,

As no explicit override endpoint is set in the moniker display name, the adapter uses the Operation1.Testobj2.1.OverrideEndpoint, since that is the first endpoint it finds associated with a TIBCO ActiveEnterprise class as well as the COM coclass Operation2.Testobj2.

Properties filepath (optional)

When the properties_filepath field is used, the override_endpoint field must either be specified as a value or represented by two bars, as shown:

tibco:tibcr://sample|Adapter for COM/Interceptor 
Instances/TIBCOCOMInterceptor1|Operation2.Testobj1||c:/propertiesf
ile 

If you modify the properties file while the interceptor is running, you must release all references to the interceptor for the new values to take effect.

For more information about the properties file, see Adapter Properties File.


TIBCO Adapter™ for COM User’s Guide
Software Release 5.3, September 2005
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com