Summary: | Spec non-compliant servant generation | ||
---|---|---|---|
Product: | CIAO | Reporter: | Abdul Sowayan <abdullah.sowayan> |
Component: | CIAO Container Implementation | Assignee: | DOC Center Support List (internal) <tao-support> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | wotte |
Priority: | P3 | ||
Version: | 0.7.8 | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 3253 |
Description
Abdul Sowayan
2007-08-16 16:37:02 CDT
Santos, I don't know 100% the answer to your question. But I think every time the container get a request to obtain an object reference to the facet, it will call into your get_foo_facet () method. Personally speaking, I think you're just asking for trouble here. I usually instantiate the facet into a CCM_IFooFacet_var type (say my_foo_var), and do the following in the get_foo_facet() method ::App::CCM_IFooFacet_ptr Foo_exec_i::get_foo_facet () { // Your code here. return ::App::CCM_IFooFacet::_duplicate(my_foo_var.in()); } That way, everything is clear and safe. There will be one instantiation for the Foo Facet. Thanks, Abdul Right now, the servant code caches the first result of get_foo_facet, so each connection will be served by a common facet executor. hth, /-Will Hmmm, that seems counter intuitive to me. Is this spec compliant or CIAO-specific behavior? Thanks, Abdul Insofar as I know, it is an implementation decision - I don't think the spec says one way or the other. It would be a relatively simple matter to patch this into CIDLC, if someone were so inclined. Thanks, /-Will Hi Abdul - To follow up, I found the following nugget on page 14 of 06-04-01 > In general, a component instance shall be prepared to return object references for facets throughout the instance’s life > cycle. A component implementation may, as part of its advertised behavior, return a nil object reference as the result of > a provide_<name> operation. This certainly suggests that the intuitive behavior (ie, servant queries the executor each time) is the behavior mandated by the spec. hth, /-Will clear target mileston updated version Will, what is the status of this? reassign It looks we are still only caching, is this something we want to change now? Yes, we still cache. I think we should update this behavior as part of the servant code rework. I will create some devportal tasks for this |