Hi,
<br>
<br>I tried the following code:
<br>
<br>::CORBA::Object_var obj = this->_get_component();
<br>MyComponent_var comp = MyComponent::_narrow(obj);
<br>ClientFacet_var client = comp->get_connection_client;
<br>client->facet();
<br>
<br>But I'm receiving a CORBA::NO_IMPLEMENT exception. I will appreciate If someone can point what I'm doind wrong.
<br>
<br>Thank you.
<br>
<br>Santos
<br>
<br>---------[ Received Mail Content ]----------
<br>
<br> Subject : [ciao-users] How to get the component context from a facet method
<br>
<br> Date : Fri, 15 Jun 2007 10:39:14 -0400 (EDT)
<br>
<br> From : "san tos" <sanntosn@lycos.com>
<br>
<br> To : <ciao-users@cse.wustl.edu>
<br>
<br>
<br>
<br>
<br>
<br> CIAO VERSION: 0.5.8
<br>
<br> TAO VERSION : 1.5.8
<br>
<br> ACE VERSION : 5.5.8
<br>
<br>
<br>
<br> HOST MACHINE and OPERATING SYSTEM:
<br>
<br> If on Windows based OS's, which version of WINSOCK do you
<br>
<br> use?: Pentium IV, Debian linix kernel 2.6
<br>
<br>
<br>
<br> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
<br>
<br> COMPILER NAME AND VERSION (AND PATCHLEVEL):
<br>
<br>
<br>
<br> THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
<br>
<br> specific file, simply state which one]:#include "ace/config-
<br>
<br>linux.h"
<br>
<br>
<br>
<br> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
<br>
<br> use a link to a platform-specific file, simply state which one
<br>
<br> (unless this isn't used in this case, e.g., with Microsoft Visual
<br>
<br> C++)]:
<br>
<br> no_hidden_visibility=1
<br>
<br> include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
<br>
<br>
<br>
<br> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/
<br>
<br>default.features
<br>
<br> (used by MPC when you generate your own makefiles): There is no
<br>
<br>such file.
<br>
<br>
<br>
<br> AREA/CLASS/EXAMPLE AFFECTED:
<br>
<br>[What example failed? What module failed to compile?]
<br>
<br>
<br>
<br> DOES THE PROBLEM AFFECT:
<br>
<br> COMPILATION? No.
<br>
<br> If so, what do your $ACE_ROOT/ace/config.h and
<br>
<br> $ACE_ROOT/include/makeinclude/platform_macros.GNU contain?
<br>
<br> LINKING?
<br>
<br> On Unix systems, did you run make realclean first?
<br>
<br> EXECUTION? No.
<br>
<br> OTHER (please specify)? Component code.
<br>
<br>[Please indicate whether ACE/TAO/CIAO, your application, or both are
<br>
<br>affected.]
<br>
<br>
<br>
<br> SYNOPSIS: How to get the component context from a facet method
<br>
<br>[Brief description of the problem]
<br>
<br>
<br>
<br> DESCRIPTION:
<br>
<br>[Detailed description of problem. Don't just say "
<br>
<br>doesn't work, here's a fix," explain what your program does
<br>
<br>to get to the state. ]
<br>
<br>
<br>
<br>Hi,
<br>
<br>
<br>
<br>I need to obtain the context of the component from a facet method of the component itself. I’m doing the following inside the facet method:
<br>
<br>
<br>
<br>::CORBA::Object_var obj = this->_get_component();
<br>
<br>
<br>
<br>After this, how do I cast the Object_var to the component executor in order I can get the context to use it like this:
<br>
<br>
<br>
<br>client_facet = component->_context->get_connection_client();
<br>
<br>
<br>
<br>Thank you.
<br>
<br>
<br>
<br>Santos
<br>
<br>
<br>
<br>
<br>
<br> REPEAT BY:
<br>
<br>[What you did to get the error; include test program or session
<br>
<br>transcript if at all possible. ]
<br>
<br>
<br>
<br>
<br>
<br> SAMPLE FIX/WORKAROUND:
<br>
<br>[If available ]
<br>
<br>
<br>
<br>
<br>
<br>
<br>Want to change your life? Find the perfect job with Lycos Jobs.
<br>
<br>Career Advice. Job Resources Recommendations.
<br>
<br>
<br>target="_blank">Post your resume find a job match!
<br>
<br>
<br><br/>
<div>
<hr style="width:85%;margin-left:0px;text-align:left"/><br/>
<b>Want to change your life? Find the perfect job with Lycos Jobs.</b><br/>
Career Advice. Job Resources & Recommendations.<br/>
<a href="http://www.careerbuilder.com/?lr=cblycos&siteid=lycoshp7"
target="_blank"><u>Post your resume & find a job match!</u></a>
</div>