anonymous wrote : In debug mode I verified that the InitialContext.lookUp(..) is done on
"java:comp/env/ejb/Calc" it's correct and it seems to confirm that the ejb
is not deployed correctly.
_steph, As we already saw in the JNDI tree view that you posted, then bean is not bound by
java:comp/env/ejb/Calc. So using that name in the lookup is incorrect. But i think i
understand what you are saying, you want to continue using that lookup string and be able
to successfully lookup the bean. Is that correct? If yes, then you will have to modify the
web.xml and jboss-web.xml to include the following (in addition to what you already have
in them)
web.xml:
| <web-app>
| ...... all your existing stuff here
| <ejb-ref>
| <ejb-ref-name>ejb/Calc</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <home>calc.interfaces.CalcHome</home>
| <remote>calc.ejb.Calc</remote>
| </ejb-ref>
| </web-app>
|
jboss-web.xml:
| <jboss-web>
| ...all your existing stuff here
| <ejb-ref>
| <ejb-ref-name>ejb/Calc</ejb-ref-name>
| <jndi-name>CalcHome</jndi-name>
| </ejb-ref>
| </jboss-web>
|
Once you add these to your web.xml and jboss-web.xml, you will be able to lookup the bean
using java:comp/env/ejb/Calc. This lookup string is going to return you the remote
interface of your bean.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066430#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...