CORBA - Common Object Request Broker Architecture
use lib "$ENV{OPALORB_ROOT}"; use CORBA; use CORBA::Exception;
try { my $orb = CORBA::ORB_init(\@ARGV); my $poa = $orb->resolve_initial_references('RootPOA'); if (CORBA::is_nil($poa)) { print STDERR "Unable to resolve the RootPOA\n"; exit(1); } ... } catch CORBA::Exception with { my $ex = shift; print STDERR "Exception: $ex\n"; } catch Error::Simple with { my $ex = shift; print STDERR "Exception: $ex\n"; };
This namespace is the starting point for all CORBA applications.
ORB_init
- This will create a new ORB or possibly return an existing
ORB. It takes two parameters. The first optional parameter is an array
reference of options (usually \@ARGV). The second optional parameter is
the name of the ORB to create or retrieve. The following options are
recognized:
-ORBConnectTimeout
This option requires one argument which is the number of seconds to allow for a remote connection to complete. A connect timeout of zero indicates that there should be no ORB imposed timeout.
-ORBId
This option requires one argument which will be the name of the ORB.
-ORBInitRef
This option requires one argument which is of the form <Name>=<Value>. <Name> is a name that is expected to be used within a call to CORBA::ORB::resolve_initial_references(). <Value> is one of the following forms:
IOR:... - The OMG IOR format.
corbaloc:iiop:[maj.min@][hostname][:[port]][,iiop:[maj.min@][hostname][:[port]]]*/<Ref Name> - The OMG IIOP corbaloc format.
corbaloc:uiop:[maj.min@][full path name][,uiop:[maj.min@][full path name]]*:/<Ref Name> - The UIOP (UNIX domain socket) corbaloc format.
corbaloc:ssliop:[maj.min@][hostname][:[port]][,ssliop:[maj.min@][hostname][:[port]]]*/<Ref Name> - The SSLIOP corbaloc format.
corbaloc:rir:[/<Ref Name>] - The OMG corbaloc format using rir. If /<Ref Name> is omitted, NameService is assumed.
corbaname:[protocol spec][/<Ref Name>][#<Stringified Name>] - The OMG corbaname format. If /<Ref Name> is omitted, NameService is assumed.
corbaname:rir:[/<Ref Name>][#<Stringified Name>] - The OMG corbaname format using resolve_initial_references(). If /<Ref Name> is omitted, NameService is assumed.
file://<path to a file> - This file would contain any one of the accepted <Value> formats.
http://<path to a file> - This file would contain any one of the accepted <Value> formats. Requires LWP::UserAgent (Go to http://search.cpan.org/perldoc?LWP::UserAgent to download it).
ftp://[id:password@]host[:port]/<filename> - This file would contain any one of the accepted <Value> formats. The id, password and port numbers are all optional. Requires Net::FTP (Go to http://search.cpan.org/perldoc?Net::FTP to download it).
-ORBListenEndpoints
This option requires one argument which is of a form similar to the OMG corbaloc.
corbaloc:iiop:[maj.min@][hostname][:[port]][,iiop:[maj.min@][hostname][:[port]]]*
corbaloc:uiop:[maj.min@][full path name][,uiop:[maj.min@][full path name]]*
corbaloc:ssliop:[maj.min@][hostname][:[port]][,ssliop:[maj.min@][hostname][:[port]]]*
Both iiop and ssliop endpoints can accept a portspan argument specified by adding /portspan=N, where N is a number between 1 and 65535, directly after the port. If the initial port number is unavailable, it will be incremented up to N times or until a usable port number is found.
For ssliop, the key and cert files are assumed to be at certs/server-key.pem and certs/server-cert.pem respectively relative to the working directory at the time the ORB creates the listening socket. This can be overridden using the SSL_KEY_FILE and SSL_CERT_FILE environment variables. A certificate authority is assumed to be at certs/my-ca.pem. The SSL_CA_FILE environment variable can be used to override this default. An additional environment variable, SSL_CIPHER_LIST, can be used to set the list of ciphers used for encryption (See http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS for more details).
is_nil
- Returns true if the object reference passed in is not
defined or is a CORBA::Object but has no profiles.
VERSION
- Returns the version number in decimal form of the opalORB
distribution.
The following environment variables are recognized:
OPALORB_MULTI_THREADED can be set to 1 in order to force your CORBA application to operate in multi-threaded mode.
OPALORB_DISABLE_IPV6 can be set to disable support for IPv6. IPv6 isn't always supported, and in some cases may be detected but not function correctly. This will allow you to disable the automatic IPv6 detection.