Getting Started with Enterprise JavaBeans™

G

Appendix C

Tutorial Home Section Home Previous Next

Get

Get

A Word about Naming Conventions

     The tutorial uses the following naming conventions for consistent tracking of all the Enterprise JavaBean and application pieces, as well as deployment names. You may use the conventions for your own code or choose another; there's nothing blessed here and a real world set of naming conventions should be considerably more rigorous and flexible. To avoid major headaches, do ensure that whatever you use is consistent and provides a logical way to track the component parts.

     The EJB 2.0 specification "recommends, but does not require, that all references to other enterprise beans be organized in the ejb subcontext of the bean's environment." For that reason, the tutorial prepends ejb/ to the bean JNDI Names. The actual mechanism for JNDI loading is not addressed by the specification, so this is definitely a vendor-proprietary area to check when deploying your own applications.

     I'll use the Metric Converter program (MetricCvt) to illustrate:


     For the initial page of the application: index.jsp. I am aware of the downsides to using "index", but it does resolve some mapping issues.


     Since the tutorial at times deploys beans and applications separately, deployment names for bean "applications" are:


     Deployment names for the real applications are:



Tutorial Home Section Home Previous Next