This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Nilesh, to use the context "java:comp/env" you have to map your ejb in any descriptor. If it's a servlet trying to get the reference this is done by ejb-ref in web.xml and the corresponding tag in sun proprietary descriptor. If it's another ejb that's done in ejb-jar.xml and the sun proprietary descriptor. If you don't wanna use this, you may get the reference using the absolute name, the JNDI name, withou the subcontext "java:comp/env". For example, "ejb/MyDearEJB".