Home : Will J-Integra Support any COM Component that has a Type Library
Q30977 - INFO: Will J-Integra Support any COM Component that has a Type Library

Will J-Integra Support any COM Component that has a Type Library?

 

Unfortunately, unless you are very familiar with MIDL (the common language that Microsoft uses to expose COM to other programming languages), the best way to find out is to try your component with J-Integra. We can, however, provide a more technical answer to this question.

The answer has to do with marshalling - or the packaging/unpackaging of parameters/method calls across the wire to the actual object. There are three types of marshalling that COM uses - type library marshalling, standard marshalling and custom marshalling. 

Type Library Marshalling

Type library marshalling means that a COM component exposes it's functionality through a type library file, which is basically a file that describes what parameters every exposed method accepts and what its return value is using MIDL. Type libraries are either included (embedded) in the DLL/OCX/EXE, or come as a separate '.TLB' file. The requirement for type library marshalling, also known as automation marshalling, is that interfaces must derive from IDispatch, and all parameters must be automation compatible. This is the type of COM component that J-Integra works with. The com2java tool will create Java "proxies" by reading in this type library, so that the Java developer can make calls in to the component via Java.

Standard Marshalling

Standard marshalling also requires a type library, but the interfaces and their parameter types are allowed more freedom - they do not necessarily have to be automation compatible (and interfaces do not have to derive from IDispatch). The cost of this however, is that proxy/stub DLL's need to be registered on the client/server respectively, to properly marshal requests and interface pointers. J-Integra has limited support for this - depending on what the type library contains, but this is not a big issue as most COM components will use automation marshalling whenever possible. Again, com2java will be used to generate proxies from this type library.

Custom Marshalling

Finally, custom marshalling allows for greatest flexibility for the COM developer - this is not supported by J-Integra at all as the marshalling used can be of any method, and is specific to the developer.

Summary

1. If the interface derives from IDispatch (Dispinterface), then J-Integra supports it in both DCOM and Native modes.

2. If the interface derives from IUnknown, and only uses oleautomation types, then J-Integra should support it, but only if the COM object's proxy/stub DLL's are registered on the client/server respectively.

3. If the interface derives from IUnknown, but does not only use oleautomation types, then J-Integra may or may not support it. You will have to register the COM object's proxy/stub DLL's and try it out.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 7/17/2009.
Last Modified by J-Integra KB Admin.
Article has been viewed 13887 times.
Rated 7 out of 10 based on 8 votes.
Print Article
Email Article