question about orber

Niclas Eklund nick@REDACTED
Tue Apr 1 15:06:30 CEST 2003


Hello!

To ensure application portability ORB's should support all interfaces
defined in the OMG specification. 
For example, if you develop a Java application using ORB X, then it's
possible to recompile your application and port to any other Java ORB.
Note, no matter how tempting it might be to use vendor specific options,
especially for the IDL compiler, you shouldn't. Why? There's a risk you
must change a lot if you decide to switch to another ORB. Since there are
no other Erlang ORB's out there, this isn't a problem and we can add
features not (yet) defined by the OMG. For example, some of the features
introduced in the POA specification Orber supported when only BOA was
available. Hence, since the POA (currently) isn't really needed it hasn't
been added to Orber.

Since you've used CORBA before it might not be necessary to read all
User's Guide chapters thoroughly, but you should read (chapter numbers
isn't the same as in the PDF-files):

 * 5 - Installing Orber

 * 6 - OMG IDL to Erlang Mapping

 * 11 - CORBA System and User Defined Exceptions

 * 14 - Debugging

Using 'corba:add_initial_service(XXX, Servant).' should work in most
cases. A better solution would be to create the object and store it in the
NameService. It's just as easy to access that object by using 'corbaname':

 java> orb.string_to_object("corbaname:iiop:1.1@REDACTED:4001/NameService#PathTo/MyServer");

Pseudo obejects are very usefull in many cases, but the following should
be fulfilled:

 * The Object can never be terminated.

 * Static, and really small, State.

 * State, if any, must always be valid.

For a more detailed description:

 shell> erl -man Module_Interface

It's easy to use the built-in IIOP-trace interceptors (see the debugging
chapter). A similar application is available (LGPL license) for Java
ORB's:

http://corbatrace.tuxfamily.org/

Best Regards

/Nick


> Hi, thanks for your answer
> First I'm using OTP R9 with orber 3.3.
> In fact, I have an existing application based on CORBA written in a
> "common" language (C++ or Java), and I want to rewrite one of my server
> in Erlang.
> Some applications use "corbaloc" string to contact this server, so we
> activate
> the servant with an persistent IOR (using the right policy of the POA). With
> this activation, we are able to specify the object key ( the key_string in
> the
> orber BNF notation).
> Reading this document, I can imagine that using
> corba:add_initial_service(XXX, Servant).
> specify a pseudo object key, but maybe I'm wrong ?
> Is there any "poa-like" in orber ?
> 
> Regards,
> Nicolas Charpentier.
> 
> >
> > Hello!
> >
> > You can find corbaname/corbaloc in chapter 7.3 (Interoperable
> > Namingservice):
> >
> >
> http://www.erlang.org/doc/r9b/lib/orber-3.3/doc/html/ch_naming_service.html#
> 7.3
> >
> > You should also look at orbDefaultInitRef/orbInitRef in chapter 5.2
> > (Configuration).
> >
> > Which version do you use?
> >
> > /Nick
> >
> > On Sun, 30 Mar 2003, Nicolas Charpentier wrote:
> >
> > > Hi,
> > > I'm beginner with orber. I want to specify the object key of my servant
> to
> > > be able to use
> > > the "corbaloc" style URL by I don't see this in the documentation.
> > > Please, someone could help me ?
> > > Thanks,
> > > Nicolas Charpentier










More information about the erlang-questions mailing list