GWT an innovative framework

After the birth of Struts “framework” became hot buzz word in the software development industry. Now almost all languages, technologies and methodologies have tons of frameworks. Recently I was trying to figure out what is latest in the market and what are the different frameworks are available. Read more of this post

Handling currency calculations in Java business application

Recently I saw a weird floating issue in Java application which made our currency calculation wrong. Can you guess what would be the output of the below code?

System.out.println(38.0 - 26.6);

Read more of this post

Java – Thread’s stack trace dump

Recently I was dealing with a deadlock issue. Usually I use eclipse break points to create deadlock situation at the same time find the line/code which causes the deadlock. But this one is bit complex scenario where it is not easy to have break points move line by line to reproduce the deadlock. Read more of this post

A JSP code to debug class loader issues

Class Loader is one of the complex concept/design to understand in Java programming. On the initial days working with Tomcat and Desktop application there is not much class loading issues. From EJB days class loading became complex by specification and implementation. Seems JavaEE 5 tries to simplify the class loading specification but I don’t know much about that. Read more of this post

Is UML dead? & What is the future of UML?

Once upon a time UML is a hot buzz word in software development industry. If you know what is aggregation, abbreviation, etc. you will get job easily as an architect. Tools like Rational Rose are costly only a few company had that tools. Read more of this post

Is design pattern teaches how to design an application?

Many of them think that if a person knows design pattern (the theory), he/she can design an application; due to this misunderstanding many stupid questions been asked in interviews about design pattern in a meaningless way. Read more of this post

JEXL – A simple expression evaluation engine

When I was developing a framework looking for a solution very similar to eval() function in JavaScript. Initially I thought of Velocity but somehow I wasn’t convinced with that approach. (Struts2 uses Velocity to externalize the HTML generation to make it customizable). Later I wrote my own parser to evaluate an expression that returns a Boolean value. Recently I found an open source which exactly meets my requirement. I don’t have to talk much about this open source you can find lot more information in their website. I thought it might be useful to others as well.

JDBC performance tuning with optimal fetch size

Tuning performance using fetch size is an old technique some of you might already be using this configuration; some may know about it but may not have implemented. Recently I have implemented in my current project, would like to share my experience. In a typical production environment database and application will be running on different physical server. Even if you have high-end server class machine the network traffic between application and database server is one of the key factor of your application performance. Read more of this post

Debugging Applet code using Eclipse

For last one month I involved in an applet development work. Its been hard to debug and fix issues in applet code as I have to use System.out.println() to see debugging information, it is very hard and time consuming, often I have to redeploy applet code when after adding a few more System.out.println. Felt my development time is wasted so started looking around solution to debug applet code. I came across an article in IBM site to debug java code remotely using eclipse. Read more of this post

Connection Pool vs. Thread Pool Settings

Connection Pool and Thread Pool are used to improve performance of applications. Most of us use these poolings with default settings not caring about their configurations or finding optimal values. But the configuration also an important factor in performance tuning. In some sense the connection pool and the thread pool settings are dependent. We will discuss about the dependency in this post. Read more of this post

Java EE – Performance Tuning Tips

Every application goes through some performance issues whether it is an intranet or internet product. As development progresses, more concentration goes to resolving requirement and technical complexities than performance issues. It is essential to introduce a phase in your development life cycle to tune the product performance before it goes to production. Read more of this post

Difference between Thread.sleep() and Object.wait()

One of my favorite interview question is: What is the difference between sleep() and wait() method? The only commonality between these two method is both halts the current thread execution. The purpose and usage are entirely different. Read more of this post

JSF onload action during restore and render response phase

When comparing JSF with action based frameworks like Struts, Webwork, etc. one of the major missing feature is onload action. Read more of this post

Pure Java Print PDF Open Source API

PDF became widely used file format to exchange documents. There are a quite a few open source API available to create PDF document from Java application. Almost there is no good open source API available to view and print the PDF content from Java application. Fortunately sun released a open source API to fill this gap. Read more of this post

Back to Basics: Statement vs. Prepared Statement

“What is the difference between Statement and Prepared Statement?” this is one of my favorite interview question. Most of the interviewee will say “Statement is not precompiled, prepared statements are precompiled, hence prepared statement will faster than statement”. My next question would be “What do you mean precompile”, the answer will be “the SQL gets compiled and reused”. My last question would be “In which layer the statement gets compiled? (like DB, JDBC, Java Apps.)”, most of them will answer JDBC. Since the answers are abstract, it could be interpreted in either way. Though the prepared statement concept are there for while very few provides in-depth answer. I did googling, the answers are scattered in various sites let me consolidate and give you a comprehensive view. Read more of this post