code: private void set_obj_timeout(final Connection connection, final int millis) {
  
  		// Change Jacorb policy for timeout
  		final org.omg.CORBA.Policy p =
  			new org.jacorb.orb.policies.RelativeRoundtripTimeoutPolicy(10000 * millis);
  		org.omg.CORBA.Object    obj = connection.getObj()._set_policy_override(
                  new Policy[] { p }, org.omg.CORBA.SetOverrideType.ADD_OVERRIDE);
  
          //  Set new instances to connection object
          connection.setObj(obj);
          switch (connection.idl_version) {
              case 5:
                  connection.device_5 = Device_5Helper.narrow(obj);
                  break;
              case 4:
                  connection.device_4 = Device_4Helper.narrow(obj);
                  break;
              case 3:
                  connection.device_3 = Device_3Helper.narrow(obj);
                  break;
              case 2:
                  connection.device_2 = Device_2Helper.narrow(obj);
                  break;
              default:
                  connection.device = DeviceHelper.narrow(obj);
                  break;
          }
  
  		// Save new timeout value
  		connection.setDev_timeout(millis);
      }
docs: ===================================================================