orbd Command in Linux



The orbd daemon is part of the CORBA (Common Object Request Broker Architecture) framework, which facilitates communication between clients and servers in a distributed environment. Persistent objects retain their state and data even after the system shuts down, enabling them to be restored and reused upon system restart.

The orbd acts as a naming service and manages persistent object references, allowing server lifecycle independence. To access the orbd Server Manager, the server must be started with servertool.

Table of Contents

Here is a comprehensive guide to the options available with the orbd command −

Note − CORBA and ORBD are no longer actively supported in modern Java versions. Consider alternatives like gRPC or REST APIs for distributed systems.

Installation of orbd Command

The orbd is a part of an older version of Java. To install a specific version of Java on Ubuntu, Debian, and other Debian-based distributions, use the following command −

sudo apt install openjdk-8-jre

To install it on Kali Linux, use −

sudo apt install openjdk-8-jre

To install Java for orbd on Arch Linux, use −

sudo pacman -S java-runtime-common

To install Fedora, use the following command −

sudo dnf install java-1.8.0-openjdk-headless

To verify that the orbd daemon is installed, run the following command to check its binary file path −

which orbd
orbd Command in Linux1

Syntax of orbd Command

The syntax of the orbd command is as follows −

orbd [options]

The [options] part of the orbd command configures settings such as the Naming Service port, persistent object port, database location, server health check frequency, and JVM options.

orbd Command Options

The commonly used options for the orbd command are listed below −

Options Description
-ORBInitialPort <port> Specifies the port where the Naming Service will listen for requests
-port <port> Sets the port for accepting requests related to persistent objects (Default: 1049)
-defaultdb <directory> Specifies the directory where persistent data (such as orb.db) is stored (Default: ./orb.db)
-serverPollingTime <milliseconds> Determines how often the health of persistent servers is checked (Default: 1000 ms)
-serverStartupDelay <milliseconds> Sets a delay before forwarding a client request to a restarted server (Default: 1000 ms)
-J<option> Passes options directly to the Java Virtual Machine (JVM)

Examples of orbd Command in Linux

This section demonstrates the usage of the orbd command in Linux with examples −

Starting orbd Server Manager

To start the orbd server manager as a background process, use the following command −

orbd -ORBInitialPort 1050 &
orbd Command in Linux2

The & sign is used to run it as a background process. To bring it into the foreground, use the fg command. Since ORBD is now operational, the server and client applications can be run.

Application Configuration

When executing the client and server applications, it is essential to specify the port number (and machine name, if necessary) where the Naming Service is active. This can be done by adding the following code to the application −

Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialPort", "1050");
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
ORB orb = ORB.init(args, props);

Here, the Naming Service is operating on port 1050 on the host MyHost.

This can also be done while running the server −

java HelloApplication -ORBInitialPort 1050 -ORBInitialHost MyHost

Workflow Example

Step 1 − Start the orbd

orbd -ORBInitialPort 1050 &

Port 1050 is where the name server will run. The -ORBInitialPort argument is required. On Solaris, root access is needed for ports below 1024, so using a port number 1024 or higher is recommended.

Step 2 − Start the servertool using the following command −

servertool -ORBInitialPort 1050
orbd Command in Linux3

Ensure the port number is the same used to start the server manager. The above command will start the servertool command-line interface −

Step 3 − Register a server −

register -server MyServer -classpath /classes-path -applicationName MyServerApp

To exit the servertool, type quit and press Enter.

Step 4 − Running an application

java MyApplication -ORBInitialPort 1050 -ORBInitialHost localhost

To stop the server, use ctrl+C.

Conclusion

The orbd daemon in CORBA enables persistent object management, acting as a naming service for client-server interactions in Java. It ensures object data survives system restarts and allows server independence.

Despite its usefulness, CORBA and ORBD are outdated and no longer supported in modern Java versions. For distributed systems today, consider using alternatives like gRPC for performance and scalability or REST APIs for simplicity and wide support across platforms.

In this tutorial, we explained the orbd daemon in Linux, its installation, syntax, options, and usage in Linux.

Advertisements