[omniORB] Objects by value?

Roger Barnett rogerb@harlequin.co.uk
Wed, 4 Apr 2001 09:14:39 +0100




henning.schmidt@philips.com writes:
>
> As a newby to CORBA I have a general question:
>
> Is it possible to specify a full-blown class as a data-types that I can use as
> input/output parameter (not just a struct)?
>
> And I really want to pass an instance of that class accross the wire, not just
a
> reference to it. When I use a regular class as a parameter type to some
function
> then the ORB expects me to pass in and out a *reference* to a local servant
instance.
> And the actual servant for that reference is always going to stay on the side
of the
> CORBA-connection where it was created. But I would like to send the actual
object
> over the channel, and really not use it as a servant at all.
>
> So my questions are:
> - is this possible at all?
> - if it happens to be possible: can do it with omniORB?


The question is, what are you trying to achieve ?

Objects by value was initially added to (foisted on?) the OMA by Java vendors
and
users who wanted to be able to do RMI-type things between Java clients &
servers.
Of course this doesn't really fit with the basic language-neutral nature of
CORBA
and the spec went through several major iterations until we got the current one.

So, if you really want to pass code across the wire then I'd have thought using
Java and a suitable Java ORB (e.g. openOrb) would be your best bet - although it
should also be possible to do this to some extent with any interpreted language.


If, on the other hand, you want to pass data-only values using the various IDL
value types then there may well be some ORBs that support this without
supporting
code transmission, but omniORB is not (AFAIK) one of them.

HTH

Roger B.