Aus expecco Wiki (Version 2.x)
(Weitergeleitet von Corba)
Wechseln zu: Navigation, Suche

The easiest way to talk to a CORBA service is to use CORBA-to-Java to generate a Java stub class, compile that and place the interface class into a separate JAR file. You can either write the call semantics into that generated Java program, or use Groovy to define a subclass and write the code interactively within expecco itself.

Then use the Java bridge to load that JAR and invoke the interface functions.

For callbacks (i.e. incoming CORBA calls), the best strategy is to define a message queue inside your Java or Groovy class, which collects the incoming request call objects (for example, a simple ArrayList instance, which collects the CORBA call-interface arguments will do.

Also add a "fetchNextMessage" function to you interface class, which takes the next incoming message from that queue (possibly waiting for the next message by using a semaphore). Also write a little 1-liner groovy block, which calls this "fetchNextMessage" interface function and returns it.

Copyright © 2014-2018 eXept Software AG