Wednesday, July 18, 2001 03:41 AM
To do this you need a C++ CORBA IDL compiler and a Java IDL compiler. You create an IDL file for the methods that you want to be accessible between the C++ process and the Java process and you compile it with the IDL-to-C++ compiler on the C++ side and the IDL-to-Java compiler on the Java side.
You then implement the methods/functions exposed by the IDL interface in C++ according to the instructions provided by your CORBA provider. You create implementations of your objects (called servants, which reside in your C++ executable process) and register them with a retrieval mechanism, e.g. the Naming Service.
You then call them through your Java client according to the instructions provided by your Java CORBA provider.
You should find sample code to do this in the programmers' references for the ORB implementations that you plan to use. You will find these on vendors websites - as a starter for ten check out Iona's and Visibroker's sites.
Hope this helps