This thread helped me to solve my problem. I was using @EJB(name=...) but the mapped name did the trick. I just want to share my understandin gon JNDI bindings. In EJB 3 if you don't specify binding informaiton in ejb-jar.xml the default bindings for the ejb in ear file :
<ear file name>/<EJB-NAME>/local
<ear file name>/<EJB-NAME>/remote
If the ejb is deployed as jar file then the bindings are
<EJB-NAME>/local
<EJB-NAME>/remote
But this is not portable as other member posted. If some body changes the ear file name the client code has to be changed.