Interface IMongoClientFactory

All Known Implementing Classes:
JndiMongoClientFactory

public interface IMongoClientFactory
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mongodb.client.MongoClient
    getMongoClient(String dataSourceName)
    Look up a MongoClient from the JNDI
    com.mongodb.client.MongoClient
    getMongoClient(String dataSourceName, Properties jndiEnvironment)
    Set the JNDI environment to use for JNDI lookups.
    Return all known/registered MongoClients
  • Method Details

    • getMongoClient

      com.mongodb.client.MongoClient getMongoClient(String dataSourceName) throws NamingException
      Look up a MongoClient from the JNDI
      Throws:
      NamingException
    • getMongoClient

      com.mongodb.client.MongoClient getMongoClient(String dataSourceName, Properties jndiEnvironment) throws NamingException
      Set the JNDI environment to use for JNDI lookups.

      Uses a Spring JndiTemplate with the given environment settings.

      Throws:
      NamingException
      See Also:
      • JndiAccessor.setJndiTemplate(org.springframework.jndi.JndiTemplate)
    • getMongoClients

      List<String> getMongoClients()
      Return all known/registered MongoClients