Docs Menu

Docs HomeDevelop ApplicationsMongoDB DriversJava

Connect to MongoDB 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 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.

←  Enable TLS/SSL on a ConnectionAuthentication Mechanisms →

On this page