[jboss-dev-forums] [JBoss AS7 Development] - @EJB(lookup) fails while context.lookup() is successfull
Dan Sirbu
do-not-reply at jboss.com
Thu Oct 20 10:58:17 EDT 2011
Dan Sirbu [http://community.jboss.org/people/lmcdasi] created the discussion
"@EJB(lookup) fails while context.lookup() is successfull"
To view the discussion, visit: http://community.jboss.org/message/632790#632790
--------------------------------------------------------------
I have a war file that has an EJB. @EJB(lookup="java:global/test-war/LcExample!<mypkg>.example.api.ILcExample") fails to do the injection while initialContext.lookup("java:global/test-war/LcExample!<mypkg>.example.api.ILcExample") returns the ejb object.
I am wondering what do I do wrong or how it is suppose to work by using @EJB. The war content is :
0 Thu Oct 20 10:10:48 EDT 2011 META-INF/
126 Thu Oct 20 10:10:46 EDT 2011 META-INF/MANIFEST.MF
0 Thu Oct 20 10:10:48 EDT 2011 WEB-INF/
0 Thu Oct 20 10:10:48 EDT 2011 WEB-INF/classes/
0 Thu Oct 20 10:10:48 EDT 2011 WEB-INF/classes/com/
0 Thu Oct 20 10:10:48 EDT 2011 WEB-INF/classes/com/.../
0 Thu Oct 20 10:10:48 EDT 2011 WEB-INF/lib/
0 Thu Oct 20 10:10:48 EDT 2011 css/
0 Thu Oct 20 10:10:48 EDT 2011 docs/
0 Thu Oct 20 10:10:48 EDT 2011 images/
448 Thu Oct 20 10:01:02 EDT 2011 WEB-INF/jboss-web.xml
1297 Thu Oct 20 09:44:42 EDT 2011 WEB-INF/web.xml
6756 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../FmHandler.class
2528 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../CmListener.class
5730 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../CmHandler.class
1152 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../LicHandler$SentinelLicenses.class
4534 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../LicHandler.class
3633 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../PmHandler.class
6470 Thu Oct 20 10:10:46 EDT 2011 WEB-INF/classes/com/.../Example.class <<-- If I do the @EJB on the Example class that exteds HttpServlet then here the @EJB works without no lookup need it.
12067 Thu Oct 20 10:10:44 EDT 2011 WEB-INF/lib/mgmt-ejb-P1A01.jar << -- EJB ifc
1390 Thu Oct 20 09:44:42 EDT 2011 css/test.css
3102 Thu Oct 20 09:44:42 EDT 2011 docs/cm.html
7051 Thu Oct 20 09:44:42 EDT 2011 docs/fm.html
6180 Thu Oct 20 09:44:42 EDT 2011 docs/lc.html
4034 Thu Oct 20 09:44:42 EDT 2011 docs/lm.html
3439 Thu Oct 20 09:44:42 EDT 2011 docs/pm.html
1929 Thu Oct 20 09:44:42 EDT 2011 images/logo.gif
8841 Thu Oct 20 09:44:42 EDT 2011 index.jsp
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/632790#632790]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111020/779a9a81/attachment.html
More information about the jboss-dev-forums
mailing list