Hello, sorry I've been out during weekend for I have no internet at home momentarily.
Injecting a @Resource would probably work on JBoss as it is one of the solutions I also read about (i will give it a try and update when i
test it on JBoss - although i have doubts, since @Resource injection is in the same category as @EJB)
I will describe the solution I found, although JBoss complains about it.
(I will update here with the WARN message after I apply the solution)
The situation was that when i try to inject using @EJB annotation, JBoss gives ERROR:
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Resolution should not happen via injection container
But when i get the context like this in User.java:
Note i added getInitialContext() and commented out the @EJB injection
It works, although in this JBoss instalation / example it also gives a bizarre error that doesn't seem to affect anything:
[STDERR] javax.naming.NameNotFoundException: GreeterBean not bound