when deploying each EJB, we need to specify the JNDI name (for example, /ejb/HelloWorld), then EJB client can use that JNDI name to do the look up for the EJB home.
context.lookup("ejb/HelloWorld");
so why is ejb-ref necessary for war and ejb jar file? Can we just use the JNDI name to the do lookup in EJB or JSP, etc.. or we will have to use ejb-ref-name?
what would be the difference between using ejb-ref-name and using ejb jndi name for lookup?
also, i saw code that use prefix the lookup name with java:/comp/env, some don't.. why? what should be the standard?
Thanks in advance.
context.lookup("ejb/HelloWorld");
so why is ejb-ref necessary for war and ejb jar file? Can we just use the JNDI name to the do lookup in EJB or JSP, etc.. or we will have to use ejb-ref-name?
what would be the difference between using ejb-ref-name and using ejb jndi name for lookup?
also, i saw code that use prefix the lookup name with java:/comp/env, some don't.. why? what should be the standard?
Thanks in advance.