CORBA Policies - help PLEASE



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*" ?????

Once I have an example that works, how could I go about adding it to the provided examples to make life easier for future generations or ORBit users?

Howard
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





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