Single-Sign-On (SSO) in Java Platform using Active Directory
Nowadays single-sign-on became a hot selling feature for all desktop and web-based products. In this article I talk about single-sign-on implementation in Java platform with Active Directory server. Since Microsoft Windows has become one of the most common corporate network platforms it is worth integrating with your product. Starting from Windows 2000 Microsoft supports Kerberos protocol. It is unusal that Microsoft support open-standard protocol, but they do in this case; good for us :-)
Read the rest of this entry »
JDBC performance tuning with optimal fetch size
Tuning performance using fetch size is an old technique some of you might already be using this technique; some may knew about this but may not have implemented. Recently I 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 the rest of this entry »
Debugging Applet code using Eclipse
For last one month I involved in an applet development work. It is 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 for every time redeploy applet code when I add a few more System.out.println. I 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 the rest of this entry »
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 the rest of this entry »
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 the rest of this entry »
Why multiple inheritance is not allowed in Java
For long time I had a question “why Sun introduced Interface concept instead of C++ style of multiple inheritance?”. I did googling but many articles and forums talks about difference between abstract class and Interface not why Interface concept required in Java. After extensive search and analysis I came to know the reason behind the Interface concept in Java.
Read the rest of this entry »
Advantages of ThreadLocal in Java
ThreadLocal is one of the rarely used class in Java. I found it is one of the powerful class in Java on multi-threaded programming. In multi threaded program generally we use session object to track the current users information.
Read the rest of this entry »





