The resource reference name is the logical name of a resource in a JNDI lookup call. The three types of resource objects are: References to these resource objects should be entered in a subcontext of the enterprise bean's environment context (java:comp/env). (These contexts are in the JNDI namespace.)

A DataSource reference should be in the jdbc subcontext. A JavaMail Session reference should be in the mail subcontext. A URL reference should be in the url subcontext. For example, in the AccountEJB class from the J2EE Devoloper's Guide, the database name is declared with:

   private String dbName = "java:comp/env/jdbc/AccountDB";
The java:comp/env/ prefix is the JNDI context for the component.

When entering this reference in the Coded Name column, type:

   jdbc/AccountDB
Similarly, prepend references to JavaMail connections with mail/ and URL connections with url/.