I'm just starting a project where I need to return POJOs from our mongo db. I did a quick search and found a few mappers in development but nothing extremely solid.
What I'm looking for:
1) Ideally, as little additional code as possible to map POJO to mongodb (and vice versa) 2) Recommended strategy/pattern for access (regarding connection pooling, injecting configuration, etc)
I did a quick search and found a few mappers in development but nothing extremely solid.
Yeah MongoDB is like 18 months old. Most of the "wrappers" for it have been written in the last 4 to 6 months, I think that you're going to have a rough time finding extremely solid. Instead you're going to find a lot of "enthusiastically built" and "running on our prod system".
NoRM is a .NET library for "POCO" to Mongo. There are several "POJO" wrappers listed on the MongoDB website. They will likely have their own details regarding connection pooling and configuration injection.
However, there's very little configuration to inject with Mongo, I mean, we're basically talking about one connection string here, maybe a "java-to-object" map, that's pretty much it. And most people do away with that last part by using conventions.
In terms of connection pooling, it's available "out-of-the-box" with the Java driver, so hopefully your POJO wrapper is leveraging it by default or tells you how to use it.
Several POJO mappers are listed in the MongoDB documentation