AW: [omniORB] omniORB 2.8.0 versus Orbix 3.0.1

Schmidmeier, Arno Arno.Schmidmeier@sirius-eos.com
Tue, 29 Feb 2000 09:27:05 +0100



> -----Urspr=FCngliche Nachricht-----
> Von:	Brecht Vermeulen [SMTP:Brecht.Vermeulen@rug.ac.be]
> Gesendet am:	Dienstag, 29. Februar 2000 00:55
> An:	omniorb-list@uk.research.att.com
> Betreff:	[omniORB] omniORB 2.8.0 versus Orbix 3.0.1
>=20
>=20
> Hi all,
>=20
> yes, I admit, we always come back to the Orbix problem, but we can't =
get
> around :-).
	[Schmidmeier, Arno]  Me currently, too. :-)

> I've tested the eg2 example (after some adaptation) between the
> Sun/Solaris2.6/Orbix3.0.1 and the Linux/Debian2.1/omniORB2.8.0 =
platforms.
>=20
> This example works perfect, independent where the server is =
executing.
> (although the combination Orbix server-omniORB client takes 2 full =
seconds
> before the call returns, because the IOR of the server object =
contains the
> port of the Orbixd (1570) and only in second instance is the object
> directly called on the right port ?, Orbix client-omniORB server =
works
> fast and perfect)
	[Schmidmeier, Arno]  I like to share my experience here which I made
with OrbixWeb 3.1.x, and the Java-Deamon. However as far as I remember =
from
Orbix 2.x, the concepts are very likly to be protable to the C/C++ =
Version.
	I had two scenarious:
	The client was pretty close to the eg2 example. MICO as well as
OmniORB tested.
	In the first Orbix was configured in a way that all IORs use the
port of the Orbixd. (Default settings)
	In such a scenario everything went ok, during the first run of f the
client.  As soon as I run the client twice serially or in parallel, the
secondary client received some invalid CORBA-Exceptions from the Iona =
Side.
	In the second scenario I configured my system, to publish its own
port number in the IORs. Now every thing works as expected. So you =
might
give this configuration a try.

	However you loose the the nice functionality of the orbixd.

	Any experiences how the "New Orbix2000" would behave?
	=20

> But when trying the eg3 example with the server on omniORB and the =
client
> on Orbix3 (with omniORB Naming Server) the client does the call, =
returns,
> works perfect, but when exiting gives a Bus Error (core dumped). =
Here,
> only two connections are made, a first one straight to the Naming =
Server
> (via the Common.Service IOR config in Orbix) and a second straight to =
the
> serving object.
>=20
> This is thus a different error from the OBJECT_NOT_EXIST exception
> described in the CORBA comparison project and described in the =
omniORB
> list, last october.
>=20
> Has anyone experience or ideas for this ?
> An abstract of the  client code is following.
>=20
> thanks,
> Brecht Vermeulen
> Ghent University
> ATLANTIS ATM-IP testlab
> -------------------------------------------------------------
> void
> hello(CORBA::Object_ptr obj)
> {
>   Echo_var e =3D Echo::_narrow(obj);
>=20
>   if (CORBA::is_nil(e)) {
>     cerr << "hello: cannot invoke on a nil object reference.\n" << =
endl;
>     return;
>   }
>=20
>   // The CORBA standard says, if a const char * string is used, then
> automatically
>   // the CORBA::string_dup functions is called.
> #ifdef __omniORB__
>   CORBA::String_var src =3D (const char*) "Hello!"; // String =
literals are
> not
>                                                   // const char*. =
Must do
>                                                   // explicit casting =
to=20
>                                                   // force the use of =
the
> copy
>                                                   // operator=3D().=20
> #elif defined __Orbix__
>   CORBA::String_var src =3D CORBA::string_dup("Hello!");=20
>   // this will work with omniORB too, but it is for showing the =
difference
> #endif
>=20
>   CORBA::String_var dest;
>=20
>   for (int i=3D0; i<10;i++) {
>   dest =3D e->echoString(src);
>=20
>   cerr << "I said,\"" << (char*)src << "\"."
>        << " The Object said,\"" << (char*)dest <<"\"" << endl;
> 
>   cerr << "The function echoString on the object is called already "=20
>        << e->times_called() << " time(s)"<<endl;
>   }
>=20
> }
>=20
>=20
> int
> main (int argc, char **argv)=20
> {
> #ifdef __omniORB__
>   CORBA::ORB_var orb =3D CORBA::ORB_init(argc,argv,"omniORB2");
> #elif defined __Orbix3__
>   CORBA::ORB_var orb =3D CORBA::ORB_init(argc,argv,"Orbix");
> #endif
>=20
>   try {
>     CORBA::Object_var obj =3D getObjectReference(orb);
>     hello(obj);
>     cout<<"still alive"<<endl;
>   }
> #ifdef __omniORB__
>   catch(CORBA::COMM_FAILURE& ex) {
>     cerr << "Caught system exception COMM_FAILURE, unable to contact =
the "
>          << "object." << endl;
>   }
>   catch(omniORB::fatalException& ex) {
>     cerr << "Caught omniORB2 fatalException. This indicates a bug is
> caught "
>          << "within omniORB2.\nPlease send a bug report.\n"
>          << "The exception was thrown in file: " << ex.file() << "\n"
>          << "                            line: " << ex.line() << "\n"
>          << "The error message is: " << ex.errmsg() << endl;
>   }
> #endif
>   catch (CORBA::SystemException& ex) {
>     cerr << "Caught a system exception."=20
> #ifdef __Orbix__
>          << ex=20
> #endif
> 	 << endl;
>   }
>   catch(...) {
>     cerr << "Caught a system exception." << endl;
>   }
>=20
>   cout<<"still alive ?"<<endl;
>   return 0;
> }
>=20
> The two 'still alives' are perfectly printed...
>=20
[Schmidmeier, Arno] =20
************************************************************************=
*
************************************************************************=
*
Arno Schmidmeier

Sirius
Simplicity out of complexity

Arno.Schmidmeier@sirius-eos.com
Phone +49/89/ 61 36 76-37
Fax +49/89/ 61 36 76-33

> =20