[JAVA-1316] Multiple Mongo Instances always have the same MongoOption Reference Created: 21/Jul/14 Updated: 11/Sep/19 Resolved: 21/Jul/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.10.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sulbigar Shanawaz | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Software |
||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
Team, I'm trying to create two instance of Mongo with different MongoOptions as the need is to connect to two different database within the same mongo host but with different connection parameters. But only one instance of MongoOption is created and only one of the possible connection parameters are set as the other one gets overridden during the second Mongo instance initialization. Is there a way to create two different instances of MongoOptions? The configuration is given below. <mongo:mongo replica-set="${mongo.host}" id="systemMongo"> Two instances of Mongo is created and they both point to a single instance of MongoOptions. Is there a way to create multiple instances of MongoOption? |
| Comments |
| Comment by Sulbigar Shanawaz [ 21/Jul/14 ] |
|
Sure. Thank You. |
| Comment by Jeffrey Yemin [ 21/Jul/14 ] |
|
No problem. I'll close this ticket then, but please post again if there's anything else we can help with. |
| Comment by Sulbigar Shanawaz [ 21/Jul/14 ] |
|
Apologies, Thank You for the assistance |
| Comment by Jeffrey Yemin [ 21/Jul/14 ] |
|
This seems like more of a Spring question than a driver question to me. Are you using Spring Data MongoDB? Have you posted this question to https://jira.spring.io/browse/DATAMONGO? |