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.
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.
|
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
The components of the display string are discussed in this section.
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).
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.
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:
tibcr://sample
, where sample
is the name of the repository instance.c:\tibco\adapter\adcom\5.3\examples\sample.dat
.
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.
|
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
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.
In this example, you:
TIBCOCOMInterceptor1
:COM/OPERATION2Lib/coClasses/Operation2.Testobj2.1
.Operation2.Testobj2
.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.
If the following changes are made to the previous example,
OverrideEndpoint
in the moniker:tibco:c:\tibco\adapter\adcom\5.3\examples\sample.dat|Adapter for COM/Interceptor Instances/TIBCOCOMInterceptor1|Operation2.Testobj2
Operation1.Testobj2.1.OverridePublisher
endpoint before the Operation1.Testobj2.1.Publisher
in the repository.
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
.
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 |