Grails

Mysql top just like we have top command in Linux

Once in my grails project i was facing the problem of freeze of server.When this happens tomcat becomes unresponsive.Later on by analyzing the thread dump we found that this problem might be due to the database and tomcat communication. So as to analyse how many connection are active at mysql end we found a query. Show processlist; […]

Anuj Aneja
Anuj Aneja
Read

Grails

Closure as an implementation to interface

Recently, I saw some code of grails Hibernate Plugin and noticed an interesting usage of ‘as’ operator. The ‘as’ operator of groovy is typically used to change the types of objects. For example: [groovy] int a = "20" as int assert a==20 [/groovy] The ‘as’ operator can be used to provide implementation to interface as […]

Mohd Farid
Mohd Farid
Read

Grails

How to get Google Indexed Pages Count, and/or do Google searches through AJAX/programmatically

Hi, Recently i had to get the count of the Pages Google has Indexed for a perticular web Site progmatically. In the process i found that Google offers an AJAX Search API to perform Google Searches. . Hence i Implemented a Class which does the same for me easily(Ajax Search in Google). And this Solution […]

Kushal Likhi
Kushal Likhi
Read

Grails

Annotation for checking required session fields

Recently I worked on a project where I used spring security plugin. Its a very wonderful plugin for making your application secured from unauthorized users. It gives you a simple annotation @Secured to add security to your action and controller. Thats the first time I got to know the real use case of annotation. So […]

Grails

Fast DB Management Through IDEA- Increase Productivity

Hi, well we can run SQL Queries and browse database through IDEA with a good GUI interface. It Just Requires Two Steps: 1) Setup (One time) 2)Usage (how to) A: Setup PART I 1) Download the Database Navigator Tool From Intellij Repo -> Download Tool 2) Then Execute in the Directory containing the downloaded file […]

Kushal Likhi
Kushal Likhi
Read

Grails

Git – How to Change Master Branch

While working on Git with a big team, there are chances that a situation might arise when you want to set some other branch as master branch.Recently we were in a same situation. Several of branches were merged to master branch. And unfortunately one of the branches merged was created from an unstable branch. Making […]

Grails

Grails console plugin gotcha

Grails console plugin is one of those which I always add to my projects. It really gives you a very handy way of debugging things and also run some quick fixes. Whenever you hit the console action you always gets a predefined message on it about the available variables, which is really good when you […]

Grails

Zen Coding in IntelliJ IDEA

Recently i Found this cool thing(Zen Coding) which is also supported by IntelliJ IDEA. Long story short, Zen Coding is a shorthand notation for writing HTML/CSS, Few Examples are as Follows: Ex-1 Writing a nested Markup Quickly Now in IDEA lets open any gsp/html page and write: [html] div#mainDivId>p+h1+p.classForP (After Writing this press TAB) [/html] […]

Grails

Setting System property from command line in grails

Hi, In one of my recent grails project, i needed to set System property from command line while running the grails application. I looked for it and found a simple solution to do so and found it worth sharing. Suppose we want to set any property, say app.property=”propertyValue”, then the command to set the property […]

Vishal Sahu
Vishal Sahu
Read
Services