CORBA 2.6 NO IDEA Avatar
  1. OMG Issue

CORBA26 — Pbl: Improper mapping rule from IDL3 to IDL2 when dealing with events.

  • Key: CORBA26-31
  • Legacy Issue Number: 3746
  • Status: closed  
  • Source: Laboratoire d`Informatique Fondamentale de Lille ( Raphael Marvie)
  • Summary:

    Dealing with the following IDL3 definition, a problem arises when
    generating the IDL2 definitions (complete IDL2 mapping is enclosed at
    the end of this mail).

    module example {
    valuetype AnEvent : Components::EventBase

    { public string value; }

    ;

    component Producer

    { publishes AnEvent output; }

    ;

    component Consumer

    { consumes AnEvent input; }

    ;
    };

    According to the chapter 5 of the CCM specification, the publishes
    definition of the Producer component is mapped to the following
    definition (excerpt).

    interface Producer : Components::CCMObject

    { Components::Cookie subscribe_output(in ::example::ProducerEventConsumers::AnEventConsumer consumer) raises (Components::ExceededConnectionLimit); }

    ;

    In the mean time, the consumes definition of the Consumer component is
    mapped to the following definition.

    interface Consumer : Components::CCMObject {

    ::example::ConsumerEventConsumers::AnEventConsumer
    get_consumer_input();

    };

    We can see that two versions of the "AnEventConsumer" interface have
    been defined in two distincts modules. Thus the following Java
    lines are not correct:

    example.Producer p = ...;
    example.Consumer c = ...;

    p.subscribe_output(c.get_consumer_input());

    The Java compiler will refuse to compile the last one, producing an
    error like "BadTypeCoerce". However, in the IDL3 definitions, both
    components have been defined in order to be used together. (sic!)

    Thus, we think that the mapping for a Consumer should not be based on
    the component definitions, but on the event definition itself. It
    would then avoid multiple (incompatible) definitions of the consumers.
    This mapping could be defined in two distinct ways.

  • Reported: CPP 1.1 — Tue, 18 Jul 2000 04:00 GMT
  • Disposition: Resolved — CORBA 2.6.1
  • Disposition Summary:

    see below

  • Updated: Fri, 6 Mar 2015 20:58 GMT