-
1. Re: Problem with local EJB JNDI lookup
nickarls May 3, 2013 8:12 AM (in response to hussain76)And you are sure the lookup happens post-deployment? Is it the same result with the other JNDI names?
-
2. Re: Problem with local EJB JNDI lookup
wdfink May 3, 2013 8:47 AM (in response to hussain76)1 of 1 people found this helpfulI'm not sure whether this will work.
Is it not possible to use a non static approach and injection?
-
3. Re: Problem with local EJB JNDI lookup
hussain76 May 3, 2013 9:17 AM (in response to nickarls)At least the given piece of code is executed after the server logs tell about the EJB's JNDI bindings (as written above). I also tried the other JNDI names given (java:global, ...), they also don't work.
For testing purposes I've configured a datasource in standalone-full.xml and performed a JNDI lookup on the datasource in the above given static code block: this succeeds.
Using injection is unfortunately not an option. Maybe I should try with a non-static approach.
-
4. Re: Problem with local EJB JNDI lookup
jaikiran May 3, 2013 9:31 AM (in response to hussain76)That code won't work without proper dependencies. Injection is one way of implicitly adding a dependency. Is that a random class from where you are doing a lookup? Why not do that lookup from some container managed component like servlet, EJB etc...?