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. The Queue and Topic Connection Factory references should be in the jms subcontext. A ConnectionFactory should be in the env subcontext. For example, a database name may be 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/, URL connections with url/, Queue and Topic connections with jms/, and ConnectionFactory references with env/.