Here I am going to share one of the cool grails command that I discovered today i.e “grails stats”. This command provides basic statistics about the current grails application including the number of files and lines of code. So, I tried this command in my grails project and see what I got. > grails stats Anybody looking […]
Grails unique constraint is very powerful way to check duplicate keys in any DBMS, but it has some impact on application performance. Lets check it by one example: Suppose we have one domain having the following structure: [code] class User { String firstName String lastName String emailId static constraints = { emailId nullable: false, blank: […]
We use logging in our application to report and persist error and warning messages as well as info messages (e.g. runtime statistics) so that the messages can later be retrieved and analyzed. Initially we were getting an instance of Logger from LoggerFactory and uses it in our class for logging information, errors, exceptions, warnings etc. […]
What is Firefox Profile Firefox saves your browser information such as Bookmarks, Downloads and Browsing History, etc in a set of files called profile, which is stored in a specified location by Firefox in user file directory. You can have multiple Firefox profiles, each containing a separate set of user information. The Profile Manager allows you […]
The day finally arrived for which we crossed couple of continents. The onening day of the GGX conference went beyond our expectations and had just the right blend of enthusiasm from the presenters and the audience alike. All the while we were travelling to the venue, we had an inkling that something new was about […]
In Grails, We can define custom beans in resources.groovy. A simple bean definition looks like [java] myClass(MyClass) [/java] Read more about them here. Recently, I wanted to define a bean, where the bean’s constructor required me to call a method on another bean to be instantiated. To make it more clear, Let us consider a […]
Selenium WebDriver is a clean, fast framework for automated testing of webapps. Selenium WebDriver, a popular and well established testing framework is a wonderful tool that provides a handy unified interface that works with a large number of browsers and allows you to write your tests in almost every language you can imagine from Java […]
Restricting concurrent sessions for a single user is a very common requirement for any software tool which requires licensing based on number of users. You can read about how we can manage (or allow) concurrent sessions with Grails 2 using Spring security plugin in this awesome concise blog here. let us see how we can […]
We often use synchronization. Imagine you have a use case in which there is some resource upon which writing is not done as much as compared to reading. So multiple threads should be able to read concurrently same resource without any problems. But if a single thread wants to write to the resource, for that all new […]