I have a stateless session bean (in ejb 3). If I use Dependency Injection of datasource it works perfectly.
But if I do direct lookup of datasource it does not work - it complains "jdbc not bound".
Can you help me here? How can it be that DI is able to find bound datasource while direct lookup is not able to do that?
Session bean along with its interface is in .jar file (and further it is in .ear file with .war file), while datsource XML file is deployed directly under default/deploy.
It's working now after I changed datasource lookup name to java:myDS from java:comp/env/jdbc/myDS
But this was working fine under JBoss 4.2.2 with java:comp/env/jdbc/myDS and with EJB 2.1.
Is there a change in how JNDI names are referenced in JBoss 5 with ejb 3?