javac++corbajacorb

Custom IDL generation with JACORB maven compiler


I need to integrate Java system with legacy C++ system. Those two system communicate through CORBA. Since Java system runs on JBoss we use JacORB.

To generate java stubs from .idl files we use maven-idl-compiler plugin (using JacORB)

org.codehaus.mojo idlj-maven-plugin org.jacorb jacorb-idl-compiler 2.2.3 provided

Everything works fine but I would like to modify the way stubs are being generates (changes names of methods,classes etc). Is there any way to do it?


Solution

  • Everything works fine but I would like to modify the way stubs are being generates (changes names of methods,classes etc). Is there any way to do it?

    This is not possible.

    The Server Skeleton and the Client Stub are generated by Corba in the implementation you have chosen. They basically contains Marshaller and Unmarshaller to handle ORB object parameters when you interfere with distributed objects.

    All this code is highly coupled with the IDL language used by CORBA, since the generation is dependent on the IDL you provided.

    Thus, you cannot modify the stub nor the skeleton directly, that wouldn't make sense since the IDL language is there to ensure a common interface between all distributed objects, no matter the implementation language.

    However, you can always modify the IDL itself to adapt it to your needs.