Hi Jothi,
JNDI is not really the same. You can use it to obtain a reference to some dependencies or resources but it works just the other way round than dependency injection. You actively look up the things you want in the case of JNDI and with DI the container (or another framework) injects it. That's why it's a principle of IoC (= inversion of control).
I'm not 100% sure why it's not allowed to inject a stateful component into a stateless but I guess with injection it would be injected into a member variable which would then be shared by multiple threads accessing the same stateless bean object. This would in turn make it unpredictable which
thread would see which injected resources. The container simply couldn't handle that every client sees the correct injected resources in this scenario. If you use JNDI to look up a stateful component and save it into a local variable within a method no concurrency conflicts can happen because local variable are thread-safe per definition. That's just a guess, but it makes sense, I think.
Marco