You want to bind an object to BEA WebLogic's JNDI implementation.
Use the WebLogic Administration console.
Here are the steps needed to bind a javax.mail.Session object (which I use as an example for this recipe) to WebLogic's JNDI implementation. The advantage of this approach is that the available Session is already configured with elements such as its SMTP host (see Table 25-1). The Session is "ready to go" for the code that will eventually look up and use the object.
Figure 25-4. Configuring a javax.mail.Session type as a JNDI object using the WebLogic Administration console
Now the JNDI object is available to Java programs using the JNDI API and the name you bound the object under. Recipe 25.5 shows how to view the JNDI tree graphically to verify that the object has been bound properly.
Table 25-1. JavaMail properties set for this recipe's Session JNDI object
Recipe 25.6 on accessing a JNDI object with a servlet on WebLogic; Recipe 25.7 on accessing a JNDI object with a JSP on WebLogic; Chapter 2 on on accessing a JNDI object with a JSP on WebLogic; Chapter 2 on deploying web components with WebLogic.