Package org.frankframework.mongodb
Class JndiMongoClientFactory
java.lang.Object
org.frankframework.jdbc.datasource.ObjectFactory<com.mongodb.client.MongoClient>
org.frankframework.mongodb.JndiMongoClientFactory
- All Implemented Interfaces:
IMongoClientFactory
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class JndiMongoClientFactory
extends ObjectFactory<com.mongodb.client.MongoClient>
implements IMongoClientFactory
MongoClientFactory that retrieves its configuration from JNDI.
- Author:
- Gerrit van Brakel
-
Field Summary
Fields inherited from class org.frankframework.jdbc.datasource.ObjectFactory
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.client.MongoClient
getMongoClient
(String name) Look up a MongoClient from the JNDIcom.mongodb.client.MongoClient
getMongoClient
(String dataSourceName, Properties environment) Set the JNDI environment to use for JNDI lookups.Return all known/registered MongoClientsMethods inherited from class org.frankframework.jdbc.datasource.ObjectFactory
add, afterPropertiesSet, augment, destroy, get, getObjectNames, setObjectLocators
-
Field Details
-
DEFAULT_DATASOURCE_NAME_PROPERTY
- See Also:
-
GLOBAL_DEFAULT_DATASOURCE_NAME_DEFAULT
- See Also:
-
GLOBAL_DEFAULT_DATASOURCE_NAME
-
-
Constructor Details
-
JndiMongoClientFactory
public JndiMongoClientFactory()
-
-
Method Details
-
getMongoClient
Description copied from interface:IMongoClientFactory
Look up a MongoClient from the JNDI- Specified by:
getMongoClient
in interfaceIMongoClientFactory
-
getMongoClient
Description copied from interface:IMongoClientFactory
Set the JNDI environment to use for JNDI lookups.Uses a Spring JndiTemplate with the given environment settings.
- Specified by:
getMongoClient
in interfaceIMongoClientFactory
- See Also:
-
JndiAccessor.setJndiTemplate(org.springframework.jndi.JndiTemplate)
-
getMongoClients
Description copied from interface:IMongoClientFactory
Return all known/registered MongoClients- Specified by:
getMongoClients
in interfaceIMongoClientFactory
-