code: public void restart_server() throws DevFailed {
          Util.out4.println("In DServer.restart_server() method");
  
          //
          // Reset initial state and status
          //
  
          set_state(DevState.ON);
          set_status("The device is ON");
  
          //
          // Destroy and recreate the muli attribute object
          //
  
          final MultiAttribute tmp = new MultiAttribute(device_name, get_device_class());
          set_device_attr(tmp);
  
          //
          // Deleting the dserver device is a specific case. We must also delete
          // all
          // TDSOM embedded in this server
          //
  
          if (class_list.isEmpty() == false) {
  
              //
              // Destroy already registered classes, devices and commands
              // To destroy already created devices, we must disconnect them from
              // the ORB
              // otherwise their reference count will never decrease to 0 and the
              // object will
              // not be eligable for garbage collection.
              //
  
              final int nb_class = class_list.size();
              final POA r_poa = Util.instance().get_poa();
              for (int j = 0; j < nb_class; j++) {
                  final Vector v = ((DeviceClass) class_list.elementAt(j)).get_device_list();
                  final int nb_dev = v.size();
  
                  for (int k = 0; k < nb_dev; k++) {
                      final DeviceImpl dev = (DeviceImpl) v.elementAt(k);
                      if (dev.get_exported_flag() == true) {
                          dev.delete_device();
                          try {
                              r_poa.deactivate_object(((DeviceImpl) v.elementAt(k)).get_obj_id());
                          } catch (final WrongPolicy ex) {
                              ex.printStackTrace();
                          } catch (final ObjectNotActive ex) {
                              ex.printStackTrace();
                          }
                      }
                  }
                  v.removeAllElements();
                  ((DeviceClass) class_list.elementAt(j)).initClass();
              }
              class_list.removeAllElements();
              System.out.println("DServer.restart_server - class list " + class_list);
  
          }
  
          // Restart everything
          init_device();
  
          // Restart polling (if any)
          Util.instance().polling_configure();
      }
docs: -----------------------------------------------------------------------------