LDAP Datastores

DataNucleus supports persisting objects to LDAP datastores (using the datanucleus-ldap plugin). Support for LDAP is in its early stages and will be enhanced in future releases. If you wish to help out in this effort either by contributing or by sponsoring particular functionality please contact us via the DataNucleus Forum.

Datastore Connection

The following persistence properties will connect to an LDAP running on your local machine

datanucleus.ConnectionDriverName=com.sun.jndi.ldap.LdapCtxFactory
datanucleus.ConnectionURL=ldap://localhost:10389
datanucleus.ConnectionUserName=uid=admin,ou=system
datanucleus.ConnectionPassword=secret


Connection Pooling

The following persistence properties will enable connection pooling

datanucleus.connectionPoolingType=JNDI

Once you have turned connection pooling on if you want more control over the pooling you can also set the following persistence properties

  • datanucleus.connectionPool.maxPoolSize : max size of pool
  • datanucleus.connectionPool.initialPoolSize : initial size of pool


Known Limitations

The following are known limitations of the current implementation

  • Datastore Identity is not currently supported
  • Optimistic checking of versions is not supported
  • Identity generators that operate using the datastore are not supported