The Interface Repository database is created and populated using the idl2ir administrative command. For a description of this command, see the
Oracle Tuxedo Command Reference and
Setting Up an Oracle Tuxedo Application. From the programmer’s point of view, there is no write access to the Interface Repository. None of the write operations defined by CORBA are supported, nor are set operations on nonread-only attributes.
•
|
Invoke the Tobj_Bootstrap::resolve_initial_references operation with a value of “CORBA::Repository”. This operation returns a reference to a InterfaceRepository object that is in the domain to which the client application is currently attached. You should use this mechanism if you are using the Oracle Tuxedo client software. For more information, see the section Tobj_Bootstrap::resolve_initial_references.
|
•
|
Invoke the CORBA::ORB::resolve_initial_references operation with a value of “CORBA::Repository”. This operation returns a reference to a InterfaceRepository object that is in the domain to which the client application is currently attached. You should use this mechanism if you are using a third-party client ORB. For more information, see the section CORBA::ORB::resolve_initial_references.
|
1.
|
The client application invokes the _get_interface operation on the CORBA::Object to get the InterfaceDef object associated with the object in question. This causes a message to be sent to the ORB that created the object reference.
|
4.
|
After the client has identified the interface, it invokes the describe_interface operation on the Interface object to get a full description of the interface (for example, version number, operations, attributes, and parameters). This causes a message to be sent to the Interface Repository, and a reply is returned.
|
module CORBA {
typedef string Identifier;
typedef string ScopedName;
typedef string RepositoryId;
enum DefinitionKind {
dk_none, dk_all,
dk_Attribute, dk_Constant, dk_Exception, dk_Interface,
dk_Module, dk_Operation, dk_Typedef,
dk_Alias, dk_Struct, dk_Union, dk_Enum,
dk_Primitive, dk_String, dk_Sequence, dk_Array,
dk_Repository,
dk_Wstring, dk_Fixed,
dk_Value, dk_ValueBox, dk_ValueMember,
dk_Native
};
};
Identifiers are the simple names that identify modules, interfaces, value types, value members, value boxes, constants, typedefs, exceptions, attributes, operations, and native types. They correspond exactly to OMG IDL identifiers. An
Identifier is not necessarily unique within an entire Interface Repository; it is unique only within a particular Repository, ModuleDef, InterfaceDef, ValueDef, or OperationDef.
A ScopedName is a name made up of one or more identifiers separated by double colons (::). They correspond to OMG IDL scoped names. An absolute
ScopedName is one that begins with double colons (::) and unambiguously identifies a definition in a Repository. An absolute
ScopedName in a Repository corresponds to a global name in an OMG IDL file. A relative
ScopedName does not begin with double colons (::) and must be resolved relative to some context.
A RepositoryId is an identifier used to uniquely and globally identify a module, interface, value type, value member, value box, native type, constant, typedef, exception, attribute, or operation. Because RepositoryIds are defined as strings, they can be manipulated (for example, copied and compared) using a language binding’s string manipulation routines.
A DefinitionKind identifies the type of an Interface Repository object.
The def_kind attribute identifies the type of the definition.
interface Contained : IRObject {
readonly attribute RepositoryId id;
readonly attribute Identifier name;
readonly attribute VersionSpec version;
readonly attribute Container defined_in;
readonly attribute ScopedName absolute_name;
readonly attribute Repository containing_repository;
struct Description {
DefinitionKind kind;
any value;
};
An object that is contained by another object has an id attribute that identifies it globally, and a
name attribute that identifies it uniquely within the enclosing Container object. It also has a
version attribute that distinguishes it from other versioned objects with the same name. The Oracle Tuxedo CORBA Interface Repository does not support simultaneous containment or multiple versions of the same named object.
Contained objects also have a defined_in attribute that identifies the Container within which they are defined. Objects can be contained either because they are defined within the containing object (for example, an interface is defined within a module) or because they are inherited by the containing object (for example, an operation may be contained by an interface because the interface inherits the operation from another interface). If an object is contained through inheritance, the
defined_in attribute identifies the InterfaceDef or ValueDef from which the object is inherited.
The absolute_name attribute is an absolute
ScopedName that identifies a Contained object uniquely within its enclosing Repository. If this object’s
defined_in attribute references a Repository, the
absolute_name is formed by concatenating the string “
::” and this object’s
name attribute. Otherwise, the
absolute_name is formed by concatenating the
absolute_name attribute of the object referenced by this object’s
defined_in attribute, the string “
::”, and this object’s
name attribute.
The containing_repository attribute identifies the Repository that is eventually reached by recursively following the object’s
defined_in attribute.
The within operation returns the list of objects that contain the object. If the object is an interface or module, it can be contained only by the object that defines it. Other objects can be contained by the objects that define them and by the objects that inherit them.
The describe operation returns a structure containing information about the interface. The description structure associated with each interface is provided below with the interface’s definition. The kind of definition described by the structure returned is provided with the returned structure. For example, if the
describe operation is invoked on an attribute object, the
kind field contains
dk_Attribute and the value field contains an
any, which contains the
AttributeDescription structure.
The lookup operation locates a definition relative to this container, given a scoped name using the OMG IDL rules for name scoping. An absolute scoped name (beginning double colons (::)) locates the definition relative to the enclosing Repository. If no object is found, a nil object reference is returned.
The contents operation returns the list of objects directly contained by or inherited into the object. The operation is used to navigate through the hierarchy of objects. Starting with the Repository object, a client uses this operation to list all of the objects contained by the Repository, all of the objects contained by the modules within the Repository, all of the interfaces and value types within a specific module, and so on.
If limit_type is set to
dk_all, objects of all types are returned. For example, if this is an InterfaceDef, the attribute, operation, and exception objects are all returned. If
limit_type is set to a specific interface, only
If set to TRUE, inherited objects (if there are any) are not returned. If set to FALSE, all contained objects (whether contained due to inheritance or because they were defined within the object) are returned.
The lookup_name operation is used to locate an object by name within a particular object or within the objects contained by that object. The
describe_contents operation combines the
contents operation and the
describe operation. For each object returned by the contents operation, the description of the object is returned (that is, the object’s
describe operation is invoked and the results are returned).
The lookup_name operation is used to locate an object by name within a particular object or within the objects contained by that object.
The describe_contents operation combines the contents operation and the
describe operation. For each object returned by the contents operation, the description of the object is returned (i.e., the object’s describe operation is invoked and the results returned).
The type attribute describes the type defined by an object derived from IDLType.
The lookup_id operation is used to look up an object in a Repository, given its
RepositoryId. If the Repository does not contain a definition for
search_id, a nil object reference is returned.
The get_canonical_typecode operation looks up the TypeCode in the Interface Repository and returns an equivalent TypeCode that includes all repository IDs, names, and member_names. If the top level TypeCode does not contain a RepositoryId, such as array and sequence TypeCodes, or TypeCodes from older ORBs, or if it contains a RepositoryId that is not found in the target Repository, then a new TypeCode is constructed by recursively calling
get_canonical_typecode on each member TypeCode of the original TypeCode.
The get_primitive operation returns a reference to a PrimitiveDef with the specified kind attribute. All PrimitiveDefs are immutable and are owned by the Repository.
The inherited describe operation for a ModuleDef object returns a ModuleDescription.
The describe operation for a ConstantDef object returns a ConstantDescription.
The inherited describe operation for interfaces derived from TypedefDef returns a TypeDescription.
The members attribute contains a description of each structure member.
The inherited type attribute is a
tk_struct TypeCode describing the structure.
The inherited type attribute is a
tk_union TypeCode describing the union.
The inherited type attribute is a
tk_enum TypeCode describing the enumeration.
The inherited type attribute is a
tk_alias TypeCode describing the alias.
module CORBA {
enum PrimitiveKind {
pk_null, pk_void, pk_short, pk_long, pk_ushort, pk_ulong,
pk_float, pk_double, pk_boolean, pk_char, pk_octet,
pk_any, pk_TypeCode, pk_Principal, pk_string, pk_objref,
pk_longlong, pk_ulonglong, pk_longdouble, pk_wchar, pk_wstring,
pk_value_base
};
interface PrimitiveDef: IDLType {
readonly attribute PrimitiveKind kind;
};
};
The bound attribute specifies the maximum number of characters in the string and must not be zero.
The inherited type attribute is a
tk_string TypeCode describing the string.
The bound attribute specifies the maximum number of wide characters in a wide string, and must not be zero.
The inherited type attribute is a
tk_wstring TypeCode describing the wide string.
tk_except TypeCode that describes the exception.
The describe operation for a ExceptionDef object returns an ExceptionDescription.
The describe operation for an AttributeDef object returns an AttributeDescription.
The operation’s mode is either oneway (that is, no output is returned) or normal.
The inherited describe operation for an OperationDef object returns an OperationDescription.
The inherited describe_contents operation provides a complete description of this operation, including a description of each parameter defined for this operation.
The base_interfaces attribute lists all the interfaces from which this interface inherits.
The is_abstract attribute is
TRUE if the interface is an abstract interface type.
The is_a operation returns
TRUE if the interface on which it is invoked either is identical to or inherits, directly or indirectly, from the interface identified by its
interface_id parameter. Otherwise, it returns
FALSE.
The describe_interface operation returns a FullInterfaceDescription describing the interface, including its operations and attributes. The operations and attributes fields of the FullInterfaceDescription structure include descriptions of all of the operations and attributes in the transitive closure of the inheritance graph of the interface being described.
The inherited describe operation for an InterfaceDef returns an InterfaceDescription.
The inherited contents operation returns the list of constants, typedefs, and exceptions defined in this InterfaceDef and the list of attributes and operations either defined or inherited in this InterfaceDef. If the
exclude_inherited parameter is set to
TRUE, only attributes and operations defined within this interface are returned. If the
exclude_inherited parameter is set to
FALSE, all attributes and operations are returned.