Home » Tag Archives: MongoDB (page 5)

Tag Archives: MongoDB

Setup MongoDB Replica Set in 4 steps

mongodb-logo

Introduction Before going into details of configuring MongoDB replica sets, let me give brief details about same: Replica Set is the feature provided by the Mongodb database to achieve high availability and automatic failover. It is kinda traditional master-slave configuration but have capability of automatic failover. It is basically group/cluster of the mongod instances which communicates, replicates to each other ...

Read More »

MongoDB Primary Keys Are Your Friend

mongodb-logo

All documents in a MongoDB collection have a primary key dubbed _id. This field is automatically assigned to a document upon insert, so there’s rarely a need to provide it. What’s interesting about the _id field is that it is time based. That is, the underlying type of _id, which is ObjectId, is a 12-byte BSON type, and 4 of ...

Read More »

MongoDB to CSV

mongodb-logo

Every once in a while, I need to give a non-technical user (like a business analyst) data residing in MongoDB; consequently, I export the target data as a CSV file (which they can presumably slice and dice once they import it into Excel or some similar tool). Mongo has a handy export utility that takes a bevy of options, however, ...

Read More »

Auditing entities in Spring Data MongoDB

mongodb-logo

Spring Data MongoDB 1.2.0 silently introduced new feature: support for basic auditing. Because you will not find too much about it in official reference in this post I will show what benefits does it bring, how to configure Spring for auditing and how to annotate your documents to make them auditable.Auditing let you declaratively tell Spring to store: date when ...

Read More »

Install, setup and start MongoDB on Windows

mongodb-logo

This post will provide the full path from downloading required binary archive/package for particular Windows version to starting up MongoDB in various ways. Following are the high level steps: Download the MongoDB binary archive Extract MongoDB archive Setup up configuration parameters and start/stop MongoDB using command line using windows services   Download the MongoDB binary archive For Windows platform, MongoDB distributes zip archive. Go to following downloads ...

Read More »

Customize Spring Social Connect Framework For MongoDB

spring-interview-questions-answers

In my previous post, I talked about the first challenge I had was to change the data model and add the connection framework. Here I want to give more details about how I did it. Spring Social project already provides a jdbc based connection repository implementation to persist user connection data into a relational database. However, I’m using MongoDB, so ...

Read More »

MongoDB: Add A Counter With Spring Data

mongodb-logo

In my blog app, you can view any user’s profile, for example, my profile page will be http://www.jiwhiz.com/profile/user1, and ‘user1’ is my user Id in the system. In MongoDB, every document object will have a unique identifier, and often we store it as String, so I have a BaseEntity class for that:               @Document ...

Read More »

Spring Data, MongoDB and JSF Integration tutorial

spring-data-logo

Introduction to sample application (MongoShop Product Catalog) After this tutorial, a sample application (MongoShop Product Catalog) with the following functional requirement will be built:               1. Searching product with different criteria (e.g. sku, product type, title, stc) 2. Create a new product with different category. 3. Edit selected product details 4. Delete selected product ...

Read More »

MongoDB Authentication

mongodb-logo

I recently updated mongometer to make it a bit more flexible. Shortly after releasing the new version, one of the users fed back an issue via a comment on the post. I booted up my machine, opened up my IDE, found the issue and had pushed the fix out to github within half-an-hour. This isn’t a quick turn-around, success story ...

Read More »

SpiderMonkey to V8 for MongoDB and mongometer

mongodb-logo

With 10gen switching the default JavaScript engine for MongoDB 2.3/2.4 from SpiderMonkey to V8 I thought I’d take the opportunity to compare the relative performances of the releases using mongometer. Being a Security bod, I really should have looked at the Additional Authentication Features first… Hey ho. I’ll document the steps taken during the comparison, including the set up, so ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.