Bug 3441 - Fix event port compatibility
Summary: Fix event port compatibility
Status: NEW
Alias: None
Product: CIAO
Classification: Unclassified
Component: CIAO Container Implementation (show other bugs)
Version: 0.6.6
Hardware: All All
: P3 enhancement
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks: 3253
  Show dependency tree
 
Reported: 2008-10-08 18:37 CDT by Will Otte
Modified: 2018-01-15 11:22 CST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Otte 2008-10-08 18:37:12 CDT
The code in the container/servant that determines if two event ports are compatible is flawed in two ways:

1.) it relies on non-standard methods (namely ciao_is_substitutable) to determine compatibility
2.) it fails in pernicious ways when invoked across nodes - from an answer I sent to the CIAO_Users mailing list:

I think the problem lies in the code that determines if the event ports are the compatible.  It essentially does this:

1) Uses the repository ID of the publisher port eventtype to create a valuetype factory
2) Uses the valuetype factory to create an instance of the eventtype
3) Attempts to do a dynamic cast to the type of the consumes port eventtype. 

This code makes  a key assumption - that a valuetype factory for the type of the publisher is 1) available and 2) registered with the ORB. 

What is happening with you is that if you have both components inside the same NodeApplication, they share an ORB and thus the publisher's value factory is registered and accessible to the subscriber.  This is not the case when they are in separate NodeApplications (i.e., separate nodes), it doesn't work (consumer doesn't have access to a Block value factory, so the ciao_is_substitutable invocation fails).

the better solution might be to.
1.  Have the container code assume they are compatible
2.  Enable declarative registration of valuetype factories via deployment plan.  

Ultimately the nonstandard call needs to be resolved.