ldapsdk
ldapsdk copied to clipboard
transactions support in unboundid ldap
Hi,
Is unboundid ldap sdk has support for transaction handling? If yes, can you please explain from which version this is available.
Thanks & Regards, Sheriff
The LDAP SDK has support for standard LDAP transactions as described in RFC 5805, and this has been supported since 2010 when the RFC was made official. The Javadoc for the StartTransactionExtendedRequest class has an example that shows how to use it, but it consists of three main parts:
- Use the StartTransactionExtendedRequest to start a transaction in the server and get a transaction ID.
- Submit all of the write operations that are part of the transaction. Each of those requests should include a TransactionSpecificationRequestControl with the transaction ID obtained from the start transaction result.
- When you're ready, you can commit (or abort) the transaction with an EndTransactionExtendedRequest.
Note that this requires an LDAP server that provide support for standard LDAP transactions. The Ping Identity Directory Server definitely supports them. I believe that the most recent versions of OpenLDAP support them as well. I'm not sure about any other types of servers.
The Ping Identity Directory Server also supports a proprietary MultiUpdateExtendedRequest that allows you to submit all of the operations to process atomically in a single request so that you can avoid the multiple round trips required when using standard LDAP transactions.
The Ping Identity Directory Server also supports a proprietary [MultiUpdateExtendedRequest](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/ldap/sdk/unboundidds/extensions/MultiUpdateExtendedRequest.html) that allows you to submit all of the operations to process atomically in a single request so that you can avoid the multiple round trips required when using standard LDAP transactions.
Will it work with AD/Samba ?
As far as I'm aware, Active Directory does not have any support whatsoever for processing multiple operations as a single atomic unit.