[Ace-users] Re: [ciao-users] Question about creation of facet
servant and executor
Sowayan, Abdullah (N-DUA)
abdullah.sowayan at lmco.com
Thu Aug 16 15:52:17 CDT 2007
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
________________________________________
From: ciao-users-bounces at cse.wustl.edu [mailto:ciao-users-bounces at cse.wustl.edu] On Behalf Of santos .
Sent: Thursday, August 16, 2007 4:43 PM
To: ciao-users at cse.wustl.edu
Subject: [ciao-users] Question about creation of facet servant and executor
CIAO VERSION: 0.5.9
TAO VERSION : 1.5.9
ACE VERSION : 5.5.9
HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you use?: Pentium IV, Debian linux kernel 2.6
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific file, simply state which one]:#include "ace/config- linux.h"
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual C++)]:
no_hidden_visibility=1
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features (used by MPC when you generate your own makefiles): There is no such file.
AREA/CLASS/EXAMPLE AFFECTED:
[What example failed? What module failed to compile?]
DOES THE PROBLEM AFFECT:
COMPILATION? No.
If so, what do your $ACE_ROOT/ace/config.h and
$ACE_ROOT/include/makeinclude/platform_macros.GNU contain?
LINKING? No.
On Unix systems, did you run make realclean first?
EXECUTION? No.
OTHER (please specify)?
[Please indicate whether ACE/TAO/CIAO, your application, or both are affected.]
SYNOPSIS: Question about creation of facet servant and executor
[Brief description of the problem]
DESCRIPTION:
[Detailed description of problem. Don't just say "<blah> doesn't work, here's a fix," explain what our program does to get to the <blah> state. ]
Hi,
I would appreciatte if you can help me clarifying some doubts about facet objects behavior. The get_facet_name in the component executor returns to the container an facet executor. If in my component executor I have a method implemented like that:
::App::CCM_IFooFacet_ptr Foo_exec_i::get_foo_facet ()
{
// Your code here.
return ( new IFooFacet_exec_i () );
}
And If I have two receptacles connected to the same component facet by DAnCE using the following deployment content:
<connection>
<name>foo_client1</name>
<internalEndpoint>
<portName>foo_facet</portName>
<kind>Facet</kind>
<instance>Foo-idd</instance>
</internalEndpoint>
<internalEndpoint>
<portName>foo_rec</portName>
<kind>SimplexReceptacle</kind>
<instance>Client1-idd</instance>
</internalEndpoint>
</connection>
<connection>
<name>foo_client2</name>
<internalEndpoint>
<portName>foo_facet</portName>
<kind>Facet</kind>
<instance>Foo-idd</instance>
</internalEndpoint>
<internalEndpoint>
<portName>foo_rec</portName>
<kind>SimplexReceptacle</kind>
<instance>Client2-idd</instance>
</internalEndpoint>
</connection>
Will I have two diferent servants for the same facet? Will the reference received by the Client1 receptacle point to a different object than that received by Client2? Will it be created one IfooFacet_exec_i executor for each connection?
Thank you very much.
Santos
REPEAT BY:
[What you did to get the error; include test program or session
transcript if at all possible. ]
SAMPLE FIX/WORKAROUND:
[If available ]
More information about the Ace-users
mailing list