# Class MongoDBHolder

java.lang.Object
org.apache.jmeter.protocol.mongodb.config.MongoDBHolder

public final class MongoDBHolder extends Object
Public API to access MongoDB
invalid reference

    DB

object created by `MongoSourceElement`

## Constructor Summary

Constructors
Constructor
Description
`MongoDBHolder()`

## Method Summary

Modifier and Type
Method
Description
`static DB`
`getDBFromSource(String varName, String dbName)`
Get access to MongoDB object
`static DB`
`getDBFromSource(String varName, String dbName, String login, String password)`
Get access to MongoDB object

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MongoDBHolder

public MongoDBHolder()

## Method Details

### getDBFromSource

public static DB getDBFromSource(String varName, String dbName)
Get access to MongoDB object

Parameters:
  `varName` - String MongoDB source
  `dbName` - Mongo DB database name
Returns:
  invalid reference

      DB

### getDBFromSource

public static DB getDBFromSource(String varName, String dbName, String login, String password)
Get access to MongoDB object

Parameters:
  `varName` - String MongoDB source
  `dbName` - Mongo DB database name
  `login` - name to use for login
  `password` - password to use for login
Returns:
  invalid reference

      DB