Re: How to use CosNaming & the name-server in ORBit2?
- From: Michael Meeks <michael ximian com>
- To: Frank Rehberger <Frank Rehberger web de>
- Cc: larsp syseng anu edu au, orbit <orbit-list gnome org>
- Subject: Re: How to use CosNaming & the name-server in ORBit2?
- Date: 06 Feb 2003 13:21:49 +0000
Hi Frank,
On Wed, 2003-02-05 at 01:20, Frank Rehberger wrote:
> this is a work in progress ORBit2-tutorial:
>
> http://user.cs.tu-berlin.de/~frehberg/tutorial/doc/ORBit2_Client_Server.html
Firstly - the tutorial is _extremely_ useful; thanks so much for
putting this together.
Secondly, just a few _minor_ stylistic points in the C examples, I've
CC'd the list to perhaps put off any other lurkers :-)
I wonder why you setup the signal handler ? that looks pretty painful
to me ;-) Not shutting the ORB down on pathalogical failure, is not
really that bad a thing to do. It might accumulate sockets in
/tmp/orbit-$USER, but 'linc-cleanup-sockets' will soon fix that.
if (ev->_major == CORBA_SYSTEM_EXCEPTION)
Normally, people write:
if (ev->_major != CORBA_NO_EXCEPTION)
I think that equates to a non-zero check, which is faster than a ==
numeric constant check in machine terms, it also (defensively) catches
USER_EXCEPTIONS as well.
Using:
if (!CORBA_Object_is_nil((CORBA_Object) orb, ev))
Is rather verbose:
if (orb != CORBA_OBJECT_NIL)
is just as good, and far shorter; if you want to be more terse, I know
of no orb where:
if (!orb)
is going to fail :-)
I'm glad you use the 'ev' variable as a CORBA_Environment *; that's
really good; also the CORBA_Environment ev[1]; trick is a really good
one - I should use it myself :-)
And finally, I'd reduce the bulk by binning the forward internal
declarations, and just initialize the vtables at the end of the file, to
save duplication and increase flexibility.
Anyhow - a very valuable contribution; if only we had a decently
maintained ORBit2 page we'd link to you ;-) [ do you want to put one
together on gnome.org ? ].
Regards,
Michael.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]