Issue in starting ConfD phase2

There is no such CDB function with the Java API. Try the above suggested fallback solution by registering a transaction hook.

Looks like this is a big backward compatibility problem with the existing system who is using the running database to query the data in prepare phase. Because of this limitation/enhancement, we end-up either stay with the older version of confd or re-design of existing system architecture.

Please suggest the best way to get the complete xml (final xml after merge) in prepare phase.

Either you

  • register a C, Python, or Erlang CDB API prepare phase subscriber application with a higher priority than your Java prepare phase subscriber application (so it is notified before your Java application) that uses the CDB API get_transaction_handle() to get the transaction ID that the Java application can use with MAAPI start_trans_in_trans() to get a transaction that can be used with MAAPI save_config() to get the complete XML.
  • register a C, Python, or Erlang CDB API prepare phase subscriber application that uses the CDB API get_transaction_handle() and use MAAPI start_trans_in_trans() to get a transaction that can be used with MAAPI save_config() to get the complete XML.
  • register a transaction hook where you get the transaction handle/ID you either in the transaction hook or later, in the prepare phase, use with MAAPI startTransInTrans() to get the complete XML with MAAPI saveConfig().
  • make a Java API enhancement request from your support contacts to have the Java API support the CDB API get_transaction_handle() function.

Thanks @cohult .
I think I’ve to define a new TransactionHook and try co-ordinating between the hook and subscription listeners.