Amit Jain

Grails

Run multiple app instances with diff config files on same tomcat server

The application I am working on, requires different configurations for the each client. For internal QA environment, we wanted to deploy multiple instances of this app with different configuration setup so that it can be tested easily and without creating tomcat instance for each deployment. So the challenge was to use different...

28-May-2015

Grails, Technology

The Biggest Grails Conference in India – GrailsConf 2015!!!

We’ve been talking about it for a while and finally GrailsConf 2015 went fabulously well. It was an amazing conference, packed with sessions from an eminent lineup of speakers and over 160 participants who gathered at The Indian Habitat Centre, New Delhi. The gathering was of mostly Java and Groovy developers. I noticed many Java...

11-Jan-2015

Grails

GrailsConf – Call for Papers is Open now

We're glad to announce the Call for Papers for GrailsConf 2015. Submit your talks about Groovy, Grails, Gradle, Spock and other GR8 technologies here. This is open for limited period of time so hurry up! About GrailsConf: Grails Conf is the biggest Grails Conference in India. It is an independent conference dedicated to the...

04-Nov-2014

Grails

Manage javascript library dependencies via bower in Grails

I loved the way node package manager loads and manage the JS dependencies, thought of doing that in my grails project as well. Until now all our third party JS files used to live with our source code. So loading them the way Maven loads Jar dependencies for us is what we are going to discuss in this blog. We would need to install...

02-Aug-2014

Grails

Groovy multiple classLoaders

I never had to worry about whether the classes loaded in our application are in the same class loader or different, until I was stuck with the weird class not found exception. We were using a third party tool (Snowbound's DocViewer) which provided around 10 jar files, which worked well for except one functionality which was provided by 3...

21-Feb-2014

Grails

Spock @ConfineMetaClassChanges annotation made writing grails unit test easier

Grails version 2.0 and above made unit testing much simpler with so many new annotations introduced. However if you wanted to mock a specific method of a class whose method is being tested or you wanted to create a stub of the class already annotated by @Mock, things would become difficult. So I always ended up mocking methods via...

10-Jan-2014

Grails

Day 2 at SpringOne2GX 2013

Multiple parallel sessions on Groovy, Grails & Spring started from early morning sharp at 8:30 am till 6:00pm. So many options/sessions to choose from. Here are the few highlights from sessions that we attended during the day. Real world applications with Spring Data Neo4j by Michael Hunger : Shared many interesting use cases of...

11-Sep-2013

Grails

Day one at SpringOne2GX 2013

The long awaited SpringOne2GX event started with registrations followed by the key note from Adrian Colyer, CTO, SpringSource. There were around 1200 attendees, making it the largest ever SpringOne2GX event. Many significant developments were shared today. A snapshot of these are: # Spring has launched its new site. # Grails 2.3.0...

10-Sep-2013

Technology

jQuery : Associate data with dom element

There are times when we need to associate data with the DOM element say td, li, div etc. I used to sometimes provide attribute 'rel' to html tag, then access it using $('divId').attr('rel'). This worked when we want to associate only one property, but doesn't work so well when there are multiple properties to be associated with the same...

21-Sep-2012

Grails

Cool Spock Ignore/IgnoreRest annotations

While writing a test case, we are generally interested in executing only the one we are working on. With JUnit test case in grails we could say "grails test-app <ClassName>.<currentTestCase>".  However it doesn't work with spock specification's. Spock framework provides multiple cool annotations,  following two annotations...

31-Aug-2012

Technology

JQuery : create URL query string from JSON/Array

Hi Friends, I was writing javascript to reload my page with different parameters. So I needed to create the queryString of those parameters but I didn't want to create it of my own. I already knew about jQuery.serialize() which serializes the form and creates the queryString, but unfortunately I didn't have form. So that gave me...

04-May-2011

Grails

Groovy: Few ways to convert string into enum

Many at times, we have a string which needs to be converted into Enum. I will be sharing few options as stated by Mr.Haki, Isa Goksu and in the last the one I discovered during the process. Lets say we have a Enum AccountType as given below : [groovy] enum AccountType { CHECKING, SAVING } assert AccountType.CHECKING...

15-Apr-2011