The IDL interface definition below provides an interface for the "initialization agent".
interface InitialReferences { typedef sequenceObjectIdList; Object get(in string objectId); ObjectIdList list(); };
The intention of this definition is that it will be used by the ORB implementations
to implement the resolve_initial_references
and list_initial_services
ORB methods. Interoperable client ORBs send an invocation to an "initialization
agent" which implements the InitialReferences
interface. The agent will
then reply to the client ORB with the requested information. The first
operation, get
, accepts a string which is the requested
service id, and returns the object reference for the requested service,
or the NIL object reference if none was found. The second operation, list
,
accepts no arguments and returns an ObjectIdList
(a sequence of strings),
containing the supported services.
This interface is implemented by a special object whose object key is
4 bytes long. The object key's value is always the 4 (upper case) characters
'INIT' encoded using ISOLatin-1 (8859.1) (hexadecimal values: 0x49 0x4e
0x49 0x54, or as a 32-bit word: 0x494e4954). This object only implements
the interface defined using IDL above; it is not required to implement
any of the operations defined on CORBA::Object
(such as is_a
,
get_implementation
or get_interface
).
All processes in the ORB run an "initialization agent". A local API (see
Initial References Service) is provided
to publish local/remote initial object references, as well as to obtain
the "initialization agent" for a given host and port. The ORB
daemon runs the "distinguished initialization agent" which has object references
for supporting server activation, security, etc. The ORB instance
should be configured with an IIOP URL that contains the address of
some "initialization agent" using the ORBDefaultInitRef
property
or parameter.
Setting the Java System Property:
java -DORBInitailURL=iiopboot://godel:2506 MyServer
Passing a property on ORB.init
:
Properties props = new Properties(); props.put("ORBDefaultInitRef", "iiopboot://godel:2506"); orb.init(props, args);
Passing program parameters to ORB.init
:
java MyServer -ORBDefaultInitRef iiopboot://godel:2506
and then:
public static void main(String[] args) { ... orb.init(props, args); ... }
If ORBDefaultInitRef
is not specified, then it defaults to
iiopboot://localhost:2506
,
which is the port on which the ORB daemon listens on.
Note: The port 2506 is reserved by Novell from IANA.
Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.