CORBA/en

Aus expecco Wiki (Version 2.x)
Version vom 11. Februar 2018, 12:42 Uhr von Mawalch (Diskussion | Beiträge) (Mawalch verschob die Seite CORBA nach CORBA/en: This is an English page)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

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-2024 eXept Software AG