In a project, we needed to have fine tune the transaction behaviour on our Service classes. One service method was calling the a method in another service. The calling service method A was to happen in one transaction and the called service method B in its own transaction. This was required because we needed to […]
Recently I got an opportunity to work on making some parts of an application RESTful with secured access. It has been a good learning experience so far and encouraged me to write a blog on it. What I have done is nothing new but I never got things at one place in clear terms. So […]
Hi, In one of my project i need to read message from message bundle in functional test cases. Such that whenever the message or label changes, we can just change it in message.properties and hence avoiding the test to fail. To achieve so, i wrote the following code in my test file and it worked […]
Hi Friends, I needed to take the backup and restore the selected table(s) of mysql database. And I found Gaurav Chauhan’s blog on taking dump of the database and to restore the database. So I tried with the same commands but with table names passed as parameters and that worked. mysqldump -u root -p my_database […]
Recently in my project I used google form submission for the email subscription’s and find it very handy for various purpose. Steps to create google form : go to google docs, click create new -> form Here you can additem/field like text, paragraphtext, multi-select etc as per your project need. Save that form by clicking […]
(based on Tomás Lin’s truthlink) This is useful when one requires link on certain condition. Instead of first using condition tag and then tag for link these can be combined into one using taglib. text or Text Other way of doing this is by using taglib. class AbcTagLib { namespaces “abc”; def testLink = {attrs, […]
Recently in one of my project user have the requirement where he can upload the pdf file and its get converted into the image file, that can be used by the user for manipulations. After looking at here and there finally we find out the imagemagick tool which converts pdf file to image file. Its […]
In my project, there was a requirement to set the session time out interval and i had no idea about how to implement it. Then my colleague Himanshu Seth came to rescue. This guy has already done it. All you have to do is to set the maximum time out interval in the session. Here […]
In one of my project I need to generate GSP (groovy server pages) on the fly and write them on the file system. There was a quartz job that updates the GSP page on regular intervals. The problem was, this functionality worked flawless in the development environment but fails in test and production environment. In […]
In one of the projects, we had to externalize the Config file to be in a properties file. All configurations related to the application were to be stored in that file. We had a few spring beans, like the JMS connection factory, which needs the brokerURL which should ideally be an external configuration as it […]
In my project we need to generate dynamic Pie charts & Area charts. I had various options to do so. 1. Use Google charts API 2. Use Grails Eastwood Chart plugins. 3. Use jFreeChart API. In case of Google charts, the application only generates the required URL & get the chart from google server , […]
I have been facing problem of validating a text input field for a valid date. We are using two popular jquery plugins : jQuery validation and jQuery UI datepicker for client side validation. I googled it and found a good solution here http://stackoverflow.com/questions/511439/custom-date-format-with-jquery-validation-plugin but it was validating only the formatting i.e. 30-Feb-2010 is a valid […]