Both application-client.xml and jboss-client.xml reside in the META-INF directory of a JAR file. This JAR file is on my CLASSPATH and is also included in my deployed EAR file (and is listed as a module in application.xml).
I'm including mail.jar and activation.jar (from JBoss release), jboss-j2ee.jar, jbossall-client.jar, and the directory path for jndi.properties on the client CLASSPATH.
What am I doing wrong? Does anyone have any ideas? Thanks.
OK, I can answer my own question. I set everything up correctly (that�s why I could use the Environment Variable and URL with J2EE-style JNDI ENC names) on the client side. However, according to Ingo Kl�ckl, you can't access JNDI resources bound under the java:/ namespace. Here's an excerpt from Ingo Kl�ckl's web page (http://www.2k-software.de/ingo/jbossjndi.html):
�java: is an ENC which is visible only in the JBoss VM. It holds references to objects which are only [sic] senseful in the JBoss environment, like data sources or other resources.�
So, the short answer is: you can�t access a JavaMail Session (a DataSource) from outside the container because JBoss binds this under its internal java: namespace, so you can�t access outside of JBoss� VM.
Duh! I should've remembered this sooner. If only I�d read my own research more closely and much sooner.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop