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/AccountDBSimilarly, prepend references to JavaMail connections with mail/ and URL connections with url/.