This module contains the functions for starting and stopping the application. It also has some utility functions to get some of the configuration information from running application.
Starts the Orber application (it also starts mnesia if it is not running).
Starts the Orber application as lightweight.
Preconditions:
Addresses
must be a list of RemoteModifiers
, equal to the
orber:resolve_initial_references_remote/2
argument. The list must
contain Orber nodes addresses, to which we have access and are not started
as lightweight.
start_lightweight(Addresses) -> ok
Addresses = [Address]
Address =
RetVal = ok | exit()
Starts the Orber application as lightweight.
Preconditions:
Addresses
must be a list of RemoteModifiers
, equal to the
orber:resolve_initial_references_remote/2
argument. The list must
contain Orber nodes addresses, to which we have access and are not started
as lightweight.
Stops the Orber application.
This function returns the true if Orber is started as lightweight, false otherwise.
get_lightweight_nodes() -> RemoteModifierList | false
This function returns false if Orber is not started as lightweight, otherwise a list of Remote Modifiers.
get_ORBInitRef() -> string() | undefined
This function returns undefined if we will resolve references locally,
otherwise a string describing which host we will contact if the Key given
to corba:resolve_initial_references/1
matches the Key set
in this configuration variable. For more information
see the user's guide.
get_ORBDefaultInitRef() -> string() | undefined
This function returns undefined if we will resolve references locally,
otherwise a string describing which host, or hosts, from which we
will try to resolve the Key given to
corba:resolve_initial_references/1
. For more information
see the user's guide.
This function returns the domain name of the current Orber domain as a string.
This function returns the port-number, which is used by the IIOP protocol. It can be configured by setting the application variable iiop_port, if it is not set it will have the default number 4001.
This function returns the port-number, which is used by the secure IIOP protocol. It can be configured by setting the application variable iiop_ssl_port, if it is not set it will have the default number 4002 if Orber is to configured to run in secure mode. Otherwise it returns -1.
iiop_timeout() -> int() (milliseconds)
This function returns the timeout value after which outgoing IIOP requests terminate. It can be configured by setting the application variable iiop_timeout TimeVal (seconds), if it is not set it will have the default value infinity. If a request times out a COMM_FAILURE exception is raised.
Note: the iiop_timeout configuration parameter (TimeVal) may only range between 0 and 1000000 seconds. Otherwise, the default value is used.
Note: IC supply the compile option ic:gen(IdlFile, [{timeout,"module::interface"}])
,
which allow the user to add an extra timeout parameter, e.g.,
module_interface(ObjRef, Timeout, ... Arguments ...)
, instead of
module_interface(ObjRef, ... Arguments ...)
. If, a stub is compiled
with the timeout option, the extra Timeout argument will override the
configuration parameter iiop_timeout
. It is, however, not possible
to use infinity
to override the Timeout parameter. The Timeout
option is also valid for objects which resides within the same Orber domain.
iiop_connection_timeout() -> int() (milliseconds)
This function returns the timeout value after which outgoing IIOP connections terminate. It can be configured by setting the application variable iiop_connection_timeout TimeVal (seconds), if it is not set it will have the default value infinity. The connection will not be terminated if there are pending requests.
Note: the iiop_connection_timeout configuration parameter (TimeVal) may only range between 0 and 1000000 seconds. Otherwise, the default value is used.
This function returns the security mode Orber is running in, which is either no if it is an insecure domain or the type of security mechanism used. For the moment the only security mechanism is ssl. This is configured by setting the application variable secure.
ssl_server_certfile() -> string()
This function returns a path to a file containing a chain of PEM encoded certificates for the Orber domain as server. This is configured by setting the application variable ssl_server_certfile.
ssl_client_certfile() -> string()
This function returns a path to a file containing a chain of PEM encoded certificates used in outgoing calls in the current process. The default value is configured by setting the application variable ssl_client_certfile.
set_ssl_client_certfile(Path) -> ok
Path = string()
This function takes a path to a file containing a chain of PEM encoded certificates as parameter and sets it for the current process.
ssl_server_verify() -> 0 | 1 | 2
This function returns the type of verification used by SSL during authentication of the other peer for incoming calls. It is configured by setting the application variable ssl_server_verify.
ssl_client_verify() -> 0 | 1 | 2
This function returns the type of verification used by SSL during authentication of the other peer for outgoing calls. The default value is configured by setting the application variable ssl_client_verify.
set_ssl_client_verify(Value) -> ok
Value = 0 | 1 | 2
This function sets the SSL verification type for the other peer of outgoing calls.
This function returns the SSL verification depth for incoming calls. It is configured by setting the application variable ssl_server_depth.
This function returns the SSL verification depth for outgoing calls. The default value is configured by setting the application variable ssl_client_depth.
set_ssl_client_depth(Depth) -> ok
Depth = int()
This function sets the SSL verification depth for the other peer of outgoing calls.
objectkeys_gc_time() -> int() (seconds)
This function returns the timeout value after which after which terminated object keys,
related to servers started with the configuration parameter {persistent, true}
,
will be removed.
It can be configured by setting the application variable objectkeys_gc_time TimeVal (seconds),
if it is not set it will have the default value infinity.
Objects terminating with reason normal or shutdown are removed automatically.
Note: the objectkeys_gc_time configuration parameter (TimeVal) may only range between 0 and 1000000 seconds. Otherwise, the default value is used.
This function returns the port-number, which is used by the CORBA bootstrapping protocol. This protocol is used to fetch an initial reference from another ORB. It can be configured by setting the application variable bootstrap_port, if it is not set it will use the iiop port.
Note: In the future it will use the port number which is set in the standard (the suggestion is 900). Because the standard is not ready in this area we in the meantime uses a port number, which do not require root permissions in Unix.
RetVal = [node()]
This function returns the list of node names that this orber domain consists of.
install(NodeList) -> ok
install(NodeList, Options) -> ok
NodeList = [node()]
Options = [Option]
Option = {install_timeout, Timeout} | {ifr_storage_type, TableType}
Timeout = infinity | integer()
TableType = disc_copies | ram_copies
This function installs all the necessary mnesia tables and load default data in some of them. If one or more Orber tables already exists the installation fails. The function uninstall may be used, if it is safe, i.e., no other application is running Orber.
Preconditions:
Mnesia will be started by the function if it is not already running on the installation node and if it was started it will be stopped afterwards.
The options that can be sent to the installation program is:
{install_timeout, Timeout}
- this timeout is how long we
will wait for the tables to be created. The Timeout value can be
infinity or an integer number in milliseconds.
Default is infinity.
{ifr_storage_type, TableType}
- this option sets the
type of tables used for the interface repository.
The TableType can be disc_copies or ram_copies. Default is
disc_copies. (All other tables in Orber are ram copies).
This function stops the Orber application, terminates all server objects and removes all Orber related mnesia tables.
Note: Since other applications may be running on the same node using mnesia uninstall will not stop the mnesia application.
add_node(Node, StorageType) -> RetVal
Node = node()
StorageType = disc_copies | ram_copies
RetVal = ok | exit()
This function add given node to a existing Orber node group and starts
Orber on the new node. orber:add_node
is called from a member in the Orber
node group.
Preconditions for new node:
-mnesia extra_db_nodes
, e.g.,
erl -sname new_node_name -mnesia extra_db_nodes ConnectToNodes_List
disc_copies
the schema type must be changed using:
mnesia:change_table_copy_type(schema, node(), disc_copies)
Orber will be started by the function on the new node.
Fails if:
The function do not remove already copied tables after a failure.
Use orber:remove_node
to remove these tables.
Node = node()
RetVal = ok | exit()
This function removes given node from a Orber node group. The Mnesia application is not stopped.