Docs Menu

Docs HomeDevelop ApplicationsMongoDB DriversJava Sync Driver

Connect to MongoDB by Using a JNDI Datasource

On this page

  • Overview

In this guide, you can learn how to connect the MongoDB Java driver to your MongoDB instance by using a Java Naming and Directory Interface (JNDI) Datasource.

MongoClientFactory includes a JNDI ObjectFactory implementation that returns MongoClient instances based on a connection URI. Consult the following guides to learn how to configure your application to connect using a JNDI Datasource.

Tip

See also:

For JNDI implementations other than those listed here, you can create your own Factory wrapper based on the driver's built-in MongoClientFactory implementation.

←  Connect to MongoDB by Using a SOCKS5 ProxyAuthentication Mechanisms →

On this page