Any recommend pattern or strategies for data access from java to mongo db?

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

Category:java Time:2010-08-05 Views:1
Tags: java mongodb

Related post

  • Design Patterns for security and data access control 2010-03-30

    Having recently discovered design patterns, and having acquired the excellent Head First Design Patterns book (can really recommend it!), I am now wondering about design patterns for security and controlling access to records in data stores. My use c

  • Data Access Layer design patterns 2009-06-28

    I have to design a Data Access Layer with .NET that probably will use more than one database management system (Mysql and Sql Server) with the same relational design. Basically, it has to be simple to switch from one database to another so I would li

  • Generic multi-layer data access pattern? 2010-06-03

    I've been playing around with some new patterns for n-layer data access, and came across one that seems very flexible and easy to implement. Basically, I needed a solution that could make various data layers pluggable/swapabale on the fly - i.e., bas

  • Data Access Layer in .net 2009-05-11

    I am designing an application where I want to reduce the burden on the developers for future for development. In this I have list of classes e.g-"User,Account,Permission and etc" now these classes are associated to the table in the database with the

  • linq2sql, repository pattern - how to query data from two or more tables? 2010-11-30

    I use Repository pattern (and linq2sql as data access) and have, for example, ProductsRep and CustomersRep. In very simple scenario db has two tables - Produsts (ProductID, CustomerID, ProductName, Date) and Customer (CustomerID, FirstName, LastName)

  • Data Access in ASP.NET MVC 3 2012-01-24

    What's the recommended way of creating a Data Access layer in real-life ASP.NET MVC applications? Is it EF? Ef Code First? NHibernate? Any other idea? Thank you & regards --------------Solutions------------- There is no recommend way. I prefer EF

  • Java data access for programming interviews 2012-04-02

    I'm studying for a programming interview in Java which may involve database access. Is there a good, easy framework that I can learn quickly and use during the programming test part of my interview? JDBC? --------------Solutions------------- If you a

  • whats the recommended Data access layer design pattern if i will apply ado entity frame work later? 2009-09-05

    I am creating a website and using Linq to SQl as a data access layer, and i am willing to make the website can work on both linq to sql and ado entity framework, without changing many things in the other layers: business logic layer or UI layer, What

  • Repository pattern with "modern" data access strategies 2010-11-12

    So I was searching the web looking for best practices when implementing the repository pattern with multiple data stores when I found my entire way of looking at the problem turned upside down. Here's what I have... My application is a BI tool pullin

  • Best "pattern" for Data Access Layer to Business Object 2009-03-13

    I'm trying to figure out the cleanest way to do this. Currently I have a customer object: public class Customer { public int Id {get;set;} public string name {get;set;} public List<Email> emailCollection {get;set} public Customer(int id) { this

  • Simple Elegant pattern to separate Data Access, Business logic and presentation 2009-04-06

    I need a simple pattern to do the above. Few things to note: 1) I have a class that I am obliged to use that does the actual data retrieving and it return DataTable 2) I am not concerned with the generic interfaces that support all possible database

  • Recommended data structure for a Data Access layer 2009-07-27

    I am building a DataAccess layer to a DB, what data structure is recommended to use to pass and return a collection? --------------Solutions------------- I use a list of data access objects mapped to the db tables. I'm not sure what language you're u

  • Data access layer libraries/technologies recommendations required 2010-12-17

    I have to create a data access layer which will get data from SQL Server Database Files Cube Instead of re-inventing the wheel, which data access layer libraries/technologies would you recommend? Can you point me to any good blogs/tutorials that you

  • Recommended considerations to design **Data Access Layer** 2011-01-31

    What are the recommended considerations to design Data Access Layer for Enterprise level application. Application built in 2.0 and N-Hibernate is used in DAL, but there are many flaws in current DAL design and performance and it has been buil

  • MVC, ORM, and data access patterns 2011-03-17

    I think I've hit that "paralysis by analysis" state. I have an MVC app, using EF as an ORM. So I'm trying to decide on the best data access pattern, and so far I'm thinking putting all data access logic into controllers is the way to go.. but it kind

  • How does data access object pattern improve performance? 2011-04-05

    While searching for design pattern to help improve a C# application performance, I came across the fast lane reader pattern which is based on data access object pattern. It is however mentioned about performance improvement in Java sun website only.

  • MVC 3/EF repository pattern and proper data access 2012-02-16

    Being rather new to MVC 3 and EF, I'm trying to understand the best architectural approach to developing an application for my company. The application will be a large-scale application that potentially handles hundreds of users at the same time, so

  • How to improve data access layer select method Pattern 2009-01-12

    Lately I find myself writing data access layer select methods where the code all takes this general form: public static DataTable GetSomeData( ... arguments) { string sql = " ... sql string here: often it's just a stored procedure name ... "; DataTab

  • Alternative Data Access pattern to Repository 2009-03-05

    I have certain objects in my domain which are not aggregate roots/entities, yet I still need to retrieve them from a database. I don't want to confuse things by creating repositories for these things. So, what are alternative data access patterns? Wo

Copyright (C), All Rights Reserved.

processed in 1.055 (s). 13 q(s)