Discussion:
[omniORB] Any Idea? How do that?
janarbek
2007-09-19 07:44:17 UTC
Permalink
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 with Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070918/4ae94e4e/attachment.htm
Gerd Schmitt
2007-09-19 13:24:32 UTC
Permalink
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 :)
Post by janarbek
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
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
***@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

***@it-studio.de
www.it-studio.de

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