I know that using the ejb-ref element in the web.xml file will ensure that the ejb is available when the web application is deployed. Is there any other reason to use the ejb-ref element? Does its usage have any impact on somehow notifying your web application if the ejb jar is redeployed?
James Carman
Ranch Hand
Joined: Feb 20, 2001
Posts: 580
posted
0
Originally posted by Anthony Watson: I know that using the ejb-ref element in the web.xml file will ensure that the ejb is available when the web application is deployed. Is there any other reason to use the ejb-ref element? Does its usage have any impact on somehow notifying your web application if the ejb jar is redeployed?
The ejb-ref actually declares a "logical name" for an EJB for use within your webapp. So, say the real JNDI name for my EJB is "ejb/AbcBean", but I refer to it in my webapp as "ejb/XyzBean", that's okay. The deployer (typically us unlucky developers) has to map those logical references to physical or actual references at deployment time. This level of indirection/abstraction allows us to piece together J2EE components more easily.
James Carman, President<br />Carman Consulting, Inc.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.