Re: CORBA Policies - help PLEASE



Hi Howard,

> The examples provided with ORBit seems to provide the bare minimum
> functionality rather than useful real world uses. For example, I would like
> to create a POA with persistent IORs but cannot find any example where
> anything other than the default policies are used.
> I did find the following snippet
> (at http://goethe.ira.uka.de/~wilhelmi/ORBit-mt/)
> 
>   CORBA_PolicyList policies;
>   ...
>   policies._length = 1;
>   policies._buffer = g_new0(CORBA_Policy, 1);
>   policies._buffer[0] = PortableServer_POA_create_thread_policy(
>                           root_poa,thread_policy,&ev );
> 
> but this seems rather strange to me because the equivalent call for the
> POA lifespan stuff should be:
> 
>   policies._buffer[0] =PortableServer_POA_create_lifespan_policy(
>                          root_poa,PortableServer_PERSISTENT,ev);
> 
> would not possibly compile as PortableServer_POA_create_lifespan_policy
> returns a PortableServer_LifespanPolicy rather than a CORBA_Policy. Am I
> expected to cast using a "void*" ?????

No, cast to "CORBA_Policy". Thats it.

Write a short note to Michael Rumpf <michael rumpfonline de>, who runs the
good orbit-recourse.sourceforge.net site.

Bye,
Sebastian
-- 
Sebastian Wilhelmi
mailto:wilhelmi ira uka de
http://goethe.ira.uka.de/~wilhelmi




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]