The Implementation Repository is the CORBA service
which manages the object implementations. The orb needs it to know
how to start up an object which implementation is not yet active.
The
IDL definition is specific to each orb implementation. For
OpenFusion RTORB Ada Edition, it is the following:
#include "Corba.idl" module CORBA { #pragma OrbRiver_Directive "Object_Id" "ImplementationRepository" interface ImplementationDef { // To startup an implementation of a shared server or // to startup a new instance of an unshared server Object Create_Object (); // To get the name (ObjectId) of the implementation // (Available since OpenFusion RTORB Ada Edition 1.2) string Name () ; // To get the path of the implementation executable string Server () ; // To get the host where the implementation runs string Host () ; // To get the activation policy of the implementation Activation_Policy Activation () ; // To get the InterfaceDef of the root object of the implementation Object Root_Interface (); }; interface Implementation_Repository { typedef sequence <ImplementationDef> Implementations ; // To add a new implementation and get its reference // Root_Interface must be an InterfaceDef object reference void Register ( in ObjectId Name, in string Server, // full pathname of the executable in string Host, // where it runs in Activation_Policy Activation, in Object Root_Interface, // InterfaceDef of the root object out ImplementationDef Impl) ; // To get the reference of an existing implementation // If Host is empty, the ORB host is preferred // If Server is not a full pathname, the first match is chosen void Get_Implementation ( in ObjectId Name, in string Server, in string Host, out ImplementationDef Impl ) ; // To get the list of references of the implementations // of the given interface // Implements must be an InterfaceDef object reference void Get_Implementations ( in Object Implements, out Implementations Impl_List) ; // To get the list of all the references of the implementations // stored in the Implementation Repository // (Available since OpenFusion RTORB Ada Edition 1.2) void Get_All_Implementations ( out Implementations Impl_List) ; // To remove an implementation from the Implementation Repository // (Available since OpenFusion RTORB Ada Edition 1.2) void remove (inout ImplementationDef Impl) ; }; };
It is possible to store several implementations
under the same name, but they must either have a different executable
pathname or run on a different host.
The Implementation Repository
is an initial service, its object id is "ImplementationRepository".
In OpenFusion RTORB Ada Edition versions 1.0 and 1.1, full edition of implementations was not possible.
The Implementation Repository objects persistent state is saved in the file $ORBRIVER_DIR/etc/ImplRep_<Id> where <Id> is the ORB identity of the containing orb. This file is only updated when the orb is cleanly stopped (see Stopping orbriver with stop_orb).
impl_editor is the tool to register implementations (CORBA services) inside the Implementation Repository of a given orb. This means:
List the contents of the Implementation Repository
Register an implementation
Delete an implementation
Display the description of an implementation
Its only switches are the orb connection switches
(see Client and Service switches).
A client needs that the orb it connects to knows the implementation
of the services this client needs to start. The registered
implementation is permanent (reloaded automatically when the orbriver
daemon starts) if the orbriver daemon has been stopped by
"stop_orb".
impl_editor prompts for commands. The
prompt is "-> ".
Example:
computer prompt >
$ORBRIVER_DIR/bin/impl_editor -ORBName OrbRiver_1
- >
The
commands are not case sensitive and some have a short alias.
The
possible commands are:
List (alias ls)
List the contents of the
Implementation Repository
Usage: List [<Name> or <RepositoryId>]
Display the list of the registered implementations
If no parameter is given, all implementations are listed
If a name is given, all implementations having this name are listed
If a RepositoryId is given, all implementations of this interface are listed
example:
-> ls ImplementationRepository
ImplementationRepository wapiti
->
Register (alias reg)
Register an implementation
Usage: Register [<Name>]
This command register an implementation
If no name is given, a name is requested, it corresponds to the name of the service declared in the root interface specification;
then the server file name (full pathname) is requested;
then the host name where the service will run is requested;
then the activation policy is requested;
eventually the root object interface RepositoryId is requested.
This information can be found in the "Initialize" procedure of the root interface of the service, when it calls "Corba.Boa.Create" to get the implementation reference: "Service name => " corresponds to the parameter "Name" (it is generated as "Tgx_Service_Name" which can be found in the client specification of the interface), "Activation policy => " corresponds to the parameter "Activation" and "Root RepositoryId => " corresponds to the parameter "Type_Id" (it is generated as "<interface name>_R_Id" which can be found in the client specification of the interface).
example:
-> reg
Service name => store
Server file name => /opt/TopGraphX/OrbRiver/examples/store_example
Host name => aratika
Activation policy => unshared_server
Root RepositoryId => IDL:/Store:1.0
->
Delete (alias del)
Delete an implementation
Usage: Destroy <implementation name>
Ask for destruction of each implementation with the given name
example:
-> del store
found on host aratika
Server => /opt/TopGraphX/OrbRiver/examples/store_example
Delete (y, n) ? y
deleted
->
Display (alias dis)
Display the description of an
implementation
Usage: Describe <implementation name> Display the characteristics of each implementation with the given name example:
-> dis store
Server => /opt/TopGraphX/OrbRiver/examples/store_example
Activation => UNSHARED_SERVER
Root Interface => IDL:/Store:1.0
->
Quote (no alias)
Change the quote character
Usage: Quote [<character>]
With no parameter, it displays the current quoting character. The given character will be used as the quoting character in order to allow the use of special characters inside command parameters. Inside a command parameter, the following characters must be quoted:
' ', the quote, the cancel character.
A quote at the end of a line means a continuation on next line.
The default quote is '`'
-> quote @
-> quote
The current quote is @
->
Cancel (no alias)
Change the cancel character
Usage: Cancel [<character>]
With no parameter, it displays the current cancel character. The given character will be used to cancel a command. The default cancel character is '?'
-> Cancel #
-> Cancel
The current cancel is #
-> ls #
cancelled
->
Help (alias h)
Display information about commands
Usage: help [command]
With no parameter, the list of commands is displayed.
With a parameter, the given command is described.
Quit (alias q)
Quit impl_editor
Usage: quit
Copyright
Micro Focus 2002-2014. All rights reserved.