Until the 1.3.2 release, the J-Integra® Java-COM bridge only supported the use of network based DCOM to allow Java objects to interact with COM objects.
This release gives you an alternative; as J-Integra® can now use native code (DLLs) to perform the bridging.
Please Note that you do not have to use the new native mode. By default, J-Integra® uses DCOM: and the native mode must be explicitly enabled.
Your Java code stays the same whether it is using native mode or DCOM mode. For this reason, please consult the standard J-Integra® documentation for a general overview of J-Integra®.
The native mode supports both IDispatch and Custom (vtable) method invocations, in both directions. The COM interfaces do not have to be dual (they can derive directly from IUnknown).
J-Integra®'s native mode supports:
Java clients talking to out-of-process (including remote) COM components
Java clients talking to in-process COM components, where the COM component's DLL is loaded in-process into the JVM's process.
COM clients talking to Java objects where the JVM is running in a separate process (on the same machine)
We have successfully loaded a Java object into MTS (in-process) and invoked methods on it from a VB base client.
We have made the Java object implement the standard IObjectControl COM interface (which it saw as a normal Java interface, generated by 'com2java'), and MTS invoked the usual methods (activate, canBePooled, etc.).
Finally, using a special hook in the J-Integra® runtime, we have accessed the IObjectContext MTS/COM+ interface from the Java object and tested some of the attributes. It correctly detected when it was operating in a transaction, for example.
Click here for more information, including step-by-step examples of the above.
As of v2.0, J-Integra® supports passing COM structs as parameters to COM methods in native mode. However, there are certain limitations:
J-Integra® supports both Multi-threaded (also called Free Threads or Multi-threaded Apartment - MTA) and Apartment-threaded (also called Single Threaded Apartment - STA) models. You can use J-Integra® runtime property, JINTEGRA_COINIT_VALUE, to set the threading models. See the related topic How to Run Java Clients in Native Mode (COM Component In-process or Out-of-process).