Question

I have a java RMI app that I want to port to using CORBA. To do that, I have to change the remote interface definition from java to IDL but I'm not exactly sure how to do that.

At the moment one of the methods in the java interface has a parameter that is not a predefined datatype (like string, int etc) but one that I defined myself. In the java interface you would define it like that:

public int doSomething(MyObject o);

In the RMI implementation passing of the object is made possible because both the client and server have the definition of class MyObject on their build path.

So I am wondering if it would work if I put the MyObject files on both client and server and then change the method definition in IDL to something like this:

long doSomething(in MyObject o);

Or do I need to define this class and its methods somehow also in the IDL?

Was it helpful?

Solution

You need to define MyObject in your idl module well. It's not sufficient to have the class defined in the build path for both client and server.

OTHER TIPS

rmic -idl will do that for you. See the tools documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top