Working with MongoDB using Java

Hello guys, This is my first post on this blog. In this post i am going to explain how to interact with MongoDB using Java.First we need to install MongoDB using apt-get command in Ubuntu. Once we have installed MongoDB, we need a MongoDB jar file(Driver) which we...

Show JSON request data in Grails action

Problem : At the time of Stripe Webhook URL integration with my grails application, I was getting an empty request in webhook URL and it confused me a lot. Finally i found out that Stripe sends response back to webhook URL in JSON format. I was not able to print the...

Working mechanism of Grails pagination

I am trying to explain the simple mechanism used in grails pagination . For this I have created brand new application which uses the grails default pagination and column sorting.In my grails-app I just used a domain class as follows: class Book { String title String...

Install ftp server on local Linux machine

In this blog post, I am going to discuss that how ftp server is install and configured on local machine. Firstly install the Ftp server on local machine. I am using Ubuntu 12.04. To install ftp server on ubuntu machine: sudo apt-get install vsftpd 1 sudo apt-get...

Mapping components in Hibernate using XML

In persistent units we often face a scenario where we think of grouping few similar properties and creating separate persistent entity for them would be expensive. For such situation creating embedded components for grouping such properties makes more sense. The life...

MongoDB for MySQL Developers : Part 1

MongoDB for MySQL/RDBMS Developers : Part 1 This is my for first post for “Mongodb for Mysql developers series”. I come from RDBMS background and these were things which were new to me: MySQL - MongoDB "Database" - "Database"...

Create simple JPA application.

We’ll be using maven for dependency management and H2 database. Let’s start by adding all the dependencies to the pom.xml. <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId>...

Grails SpringSecurity Session testing

Today I am going to explain Grails springSecurity Session testing. Let us make a controller and action that is mentioned below. Here I have made a controller named as UserController and a check action that will check for user authentication and I have made the domain...

Grails performance monitoring using newrelic

In this post i am going to talk about how we started monitoring the performance of our grails application. We have a big release coming up in couple of months and development on the product was going on from last 10 months. In one of our reviews last month we started...

Grails logging/printing native SQL queries

Grails provide you to log all the hibernate queries by setting logSql=true in the DataSource.groovy file like: environments { development { dataSource { ... logSql = true } } ... But native SQL queries are not logged. To log the SQL queries add groovy.sql in you log4j...

generate link in grails services

We can easily generate links in grails controllers, gsps and tag libraries using g.link method of grails tag library. But tag libraries are not accessible in the grails services. Grails provide us grailsLinkGenerator bean to create link in grails services. First...