I am new to testing using JUnit. I have the following questions: a] Which is the right book that covers the whole of JUnit testing that includes J2EE? b] Where can i find the necessary resources in the net?
I don't think there is one single book that is best. I recommend at least two books: Pragmatic Unit Testing, and JUnit Recipes. There are other books on the subject worth reading including Junit In Action, and Unit Testing in Java to name but a couple, but I consider Pragmatic Unit Testing to be a must read for the essentials, and JUnit Recipes to be the single best book covering J2EE.
Surya, JUnit Recipes has more patterns/techniques and common issues than JUnit in Action. I found both to be valuable reads though. JUnit Recipes also covers more topics, such as XML testing. You can see the JUnit Recipes table of contents to compare it to the book you have.
And just for completeness, "Unit Testing in Java" discusses some topics that the other two are missing, such as testing Swing GUIs and concurrent code.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus