posted 19 years ago
Yes, it is a fundamental EJB design principle that the Bean Provider (who writes the EJBs) is assumed not to know anything about the operational environment in which the EJBs will run. So, the BP makes up a fake JNDI name, declares it in the <ejb-ref> element in the ejb-jar.xml deployment descriptor file and uses it in the code. It is the job of the Deployer to map the fake JNDI name to the real JNDI name. This is typically done in a server-specific DD file.
Here is an example.
The developer writes code like this.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3