tango-controls/JTango

fr.esrf.TangoApi.DbDevExportInfo class not taking into account pid parameter

bourtemb opened this issue · 1 comments

fr.esrf.TangoApi.Database.export_device method is taking a DbDevExportInfo object as parameter.
toStringArray() method is then invoked on this object (in fr.esrf.TangoApi.DatabaseDAODefaultImpl.export_device() method).
The resulting string array is then passed to DbExportDevice command which is executed on the Database server object.

The Database server is expecting the following arguments, in this order in the String array argin:

  • Str[0] = device name
  • Str[1] = CORBA IOR
  • Str[2] = device server process host name
  • Str[3] = device server PID or string "null"
  • Str[4] = device server process version

The problem is fr.esrf.TangoApi.DatabaseDAODefaultImpl.export_device() is not passing the arguments expected by the database server for this command.
DbDevExportInfo.toStringArray() method is creating a string array with the following cells:

  • Str[0] = device name
  • Str[1] = CORBA IOR
  • Str[2] = device server process host name
  • Str[3] = version
  • Str[4] = "0"

There seems to be an inconsistency in jtango because there is another class named org.tango.client.database.DeviceExportInfo which seems very similar to fr.esrf.TangoApi.DbDevExportInfo class and used by org.tango.client.database.Datavase.exportDevice() method but taking into account correctly the pid parameter.

@bourtemb thanks for the detailed report!