[omniORB] Any Idea? How do that?

Gerd Schmitt extern.schmitt at kmweg.de
Wed Sep 19 10:24:12 BST 2007


just make a server process that creates both servlets,
activate the POA(s) of the servlets and call orb->run

from my server holding several servlets and using the special NSPOA:

--8<---snip----
CORBA::ORB_var  orb = CORBA::ORB_init(argc, argv);

// I don't want/need the nameservice, so I use the "omniINSPOA"
CORBA::Object_var obj = orb->resolve_initial_references("omniINSPOA");
PortableServer::POA_ptr poa = PortableServer::POA::_narrow(obj);
assert(!CORBA::is_nil(poa));

// create the servlets you need (CorbaObjectCreator::initialise() is
// my code creating the servlets, not a CORBA call)
CorbaObjectCreator::initialise(orb, normalExerciseId, playbackExId);

// activate the POA via it's manager. (Otherwise incomming requests are blocked)
poa->the_POAManager()->activate();

// enter the eventloop => now our servants can serve incomming requests
orb->run(); // never returns
-->8---snap----

now any client may do calls on your servlet objects.

hth,
Gerd, hoping the Gurus on the list won't raise an eyebrow :)


janarbek wrote:
> Dear all,
>  
> I have two interfaces as following.
>  
> interface ShortInterface{
>  short returnType();
> }
>  
> interface *LongInterface*{
>  long returnType();
> }
>  
> For each interface I made Server and Clinet. For example for 
> ShortInterface there is ServerShort and ClientShort module and for 
> *LongInterface* there is *ServerLong* and *ClientLong*
>  
> Now, ServerLong, ClientLong, ServerShort, ClientShort are working fine 
> as a pair in separate module.
>  
> I need to integrate ServerLong with ServerShort and ClientLong with 
> ClientShort. Is there any idea how I can do it? Of course, it might be 
> silly question but do I have to have one ORB for them? and one POA for 
> them????
>  
> Regards.
>  
>  
>  
>  
> 
> ------------------------------------------------------------------------
> Don't let your dream ride pass you by. Make it a reality 
> <http://us.rd.yahoo.com/evt=51200/*http://autos.yahoo.com/index.html;_ylc=X3oDMTFibjNlcHF0BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0b3MtZHJlYW1jYXI-> 
> with Yahoo! Autos.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list


-- 
Gerd Schmitt
externer Dienstleister der
     Krauss-Maffei Wegmann GmbH & Co. KG
     Krauss-Maffei-Str. 11
     80997 München
     Tel: +49/89/8140.4877
     extern.schmitt at kmweg.de

---------------------------------------

IT-Studio GmbH
Zugspitzstraße 23, D-82223 Eichenau

Fon: +49 (0) 8141-537 20 84
Fax: +49 (0) 8141-537 20 99

gschmitt at it-studio.de
www.it-studio.de

---------------------------------------
A triangle was a big improvement over the square wheel: it eliminated one bump.




More information about the omniORB-list mailing list