[Ace-users] Re: [ciao-users] Calling ccm_activate on CIAO 0.5.9

Gan Deng gan.deng at vanderbilt.edu
Thu Sep 13 13:17:09 CDT 2007


Santos,

Could you please try this?

::Components::EnterpriseComponent_var new_client =
     home_client->create();
::Components::SessionComponent_var session_comp =
     ::Components::SessionComponent::_narrow(new_client.in ());
session_comp->ccm_activate();

Let me know whether it works for you.

thanks,
Gan

santos . wrote:
> Hi Gan,
> 
> I'm calling the CIAO_REGISTER_OBV_FACTORY for the valuetype in the 
> ccm_activate of the component. That's why I need to call ccm_activate 
> after creating the component from its home. But, although as was able to 
> narrow the component to SessionComponent after your instructions, I'm 
> getting a null referenbe after the cast. The variable session_comp is 
> null after the narrow operation.
> 
>    Client_var new_client = home_client->create();
>    ::Components::SessionComponent_var session_comp = 
> ::Components::SessionComponent::_narrow(new_client);
>    session_comp->ccm_activate();
> 
> Thank you.
> 
> Santos
> 
> 2007/9/12, Gan Deng <gan.deng at vanderbilt.edu 
> <mailto:gan.deng at vanderbilt.edu>>:
> 
>     Santos,
> 
>     santos . wrote:
>      > Hi Gan,
>      >
>      > I included "CCM_SessionComponentC.h" in the header and the
>      > CIAO_Container library in my MPC file and the following code
>     compiled fine:
>      >
>      >    Client_var new_client = home_client->create();
>      >    ::Components::SessionComponent_var session_comp =
>      > ::Components::SessionComponent::_narrow(new_client);
>      >    session_comp->ccm_activate();
>      >
>      > But I tested the session_comp variable and it has null value. The
>      > new_client variable is not null as expected. I need to call
>     ccm_activate
>      > in order to register the valuetype factories in the new client
>     component
>      > orb. Did I do something wrong?
> 
>     You must explicitly register event type (value type) factory by using
>     the CIAO_REGISTER_OBV_FACTORY macro which is available in CIAO, since
>     ccm_activate is not intended for this task.
> 
>     Take care,
>     Gan
> 
>     _______________________________________________
>     ciao-users mailing list
>     ciao-users at mail.cse.wustl.edu <mailto:ciao-users at mail.cse.wustl.edu>
>     http://mail.cse.wustl.edu/mailman/listinfo/ciao-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ciao-users mailing list
> ciao-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ciao-users



More information about the Ace-users mailing list