문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top