[jboss-dev-forums] [Design of EJB 3.0] - Re: jndi name issues

wolfc do-not-reply at jboss.com
Wed Apr 30 03:22:46 EDT 2008


I'll only cover @EJB on class level, because method and field just add beanInterface and name to the mix.

@EJB(name="ejb1", mappedName="refs/client/EJB1")
Should create java:comp/env/ejb1 -> refs/client/EJB1.
@EJB(name="ejb1")
Is illegal.
@EJB(name="ejb1", beanInterface=IFace1.class)
Should first look in the current deployment unit for a bean implementing IFace1, then sibling deployments, then parent sibling deployments (who should look into child deployments) recursively. By spec this stops at JavaEE application level.
@EJB(name="ejb1", beanName="Ejb2Bean")
Should first look in the current deployment unit for a bean named "Ejb2Bean", then sibling deployments, then parent sibling deployments (who should look into child deployments) recursively. By spec this stops at JavaEE application level.
@EJB(name="ejb1", beanName="../myjar.jar#Ejb3Bean")
Looks in sibling deployment "myjar.jar" for a bean named "Ejb3Bean".

By now the reference should be resolved and the bean.mappedName should be inserted in the ejb.mappedName. If not, loud warning or exception.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147720#4147720

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147720



More information about the jboss-dev-forums mailing list