Technology

Creating Paged Media with Different Paged Modes Using CSS3

In one of our projects, we had to create PDF documents from HTML. The iText renderer was an excellent solution to do that. However, the tricky part was that the cover page had to be of portrait orientation and the rest of the document, of landscape orientation. After doing a fair share of searching on […]

Grails

Grails Transactions using @Transactional annotations and Propagation.REQUIRES_NEW

Hi All, Here is how you can implement a new transaction in an already executing transaction in Grails which uses nothing but Spring framework’s Transaction mechanism as an underlying implementation. Spring provides @Transactional annotations to provide declarative transactions. We can use the same in our Grails project to achieve the transactional behavior. Here is the […]

Grails

Grails : load proxy domain objects

Hi Friends, I was going through grails docs, encountered a method called load(), found it really useful thought would share with you. What load() does is, it creates a proxy object and doesn’t retrieve the record from the database until property other than id is accessed. Let us consider a scenario, where we have id […]

Technology

Compiled List of Some handy firefox shortcuts

Auto complete .com Address Ctrl+Enter Auto complete .net Address Shift+Enter Auto complete .org Address Ctrl+Shift+Enter Back Alt+Left Bookmark All Tabs Ctrl+Shift+D Bookmark This Page Ctrl+D Bookmarks Ctrl+B Copy Ctrl+C Cut Ctrl+X Clear Recent History Ctrl+Shift+Del Downloads Ctrl+Shift +Y Error Console Ctrl+Shift+J Forward Alt+Right Close Tab Ctrl+W Close Window Ctrl+W New Tab Ctrl+T New Window Ctrl+N […]

Technology

Enum datatype in mysql

Recently in a Grails project that I am currently working on, the client wanted to have few functionalities of our web application on iPhone as well. We are using Enums heavily in our project and the iPhone development cannot recognize from looking at the tables that few fields are Enums so those need to be […]

Technology

Tomcat 6 in-memory session replication

Hi All, Here are the few basic steps that you need to follow in order to achieve the in-memory session replication between two or more Tomcat 6 instances. This blog refers the Apache Tomcat documentation as found here: http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html. The Tomcat documentation provides more detailed explanation of the Clustering concepts as well as the definition […]

Technology

Tomcat 6 Session Persistence through JDBCStore

In one of our recent projects, we needed to save the HTTP session in the database. This blog refers the Apache documentation as found here: http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html These are the following steps that need to be followed: Step 1: Create a database named tomcat (as shown in our example in Step 3 below) or any other […]

Grails

How to generate DDL script for domain classes in Grails using schema-export target

On most of my grails projects, I am used to let grails handle database schema creation for me. However, there is a project where the database is shared between multiple applications. In that project, we have to check-in our table creation/modification script as a SQL file, which is later executed by a DBA. I use […]

Technology

Linux – Managing applications running on system start-up

Rcconf is a tool that we recently discovered. This tool allows you to manage your start-up applications easily. We found this tool when me and my colleague Aman were trying to identify the processes that we never use but they do eat up a lot of our system resources. We found this link very useful: […]