-
1. Re: WAR Deployment Examples
juhalindfors Jan 26, 2003 7:21 AM (in response to carcudi)Not sure what the problem here is but...
java:comp/env/mail/session is a lookup to a private name space, so somewhere in your deployment descriptors you need to map this to java:/Mail (I'm not familiar with the examples.war your trying to deploy, nor have I actually tried to use the mail session in JBoss).
Deploying a packaged examples.war under deploy directory is ok. You only need to create an examples.war directory under deploy if you want to deploy your web archive in an expanded format (not in a single package)
HTH -
2. Re: WAR Deployment Examples
carcudi Jan 27, 2003 5:52 PM (in response to carcudi)I Posted a reply to this earlier, but it didn't take.
At any rate, everything I mentioned in the original EMail was working, just slightly tweaked.
I guess my question would be, is it possible to cross reference jndi entries via other entries?
The web.xml file for this app contains the resource ref:
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
How might I modify this entry to "redirect" to the JBoss java:/Mail ref, and therefore eliminate the need to modify the source Java code to point directly to java:/Mail? -
3. Re: WAR Deployment Examples
carcudi Jan 27, 2003 5:56 PM (in response to carcudi)I Posted a reply to this earlier, but it didn't take.
At any rate, everything I mentioned in the original EMail was working, just slightly tweaked.
I guess my question would be, is it possible to cross reference jndi entries via other entries?
The web.xml file for this app contains the resource ref:
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
How might I modify this entry to "redirect" to the JBoss java:/Mail ref, and therefore eliminate the need to modify the source Java code to point directly to java:/Mail? -
4. Re: WAR Deployment Examples
adrian.brock Jan 27, 2003 7:38 PM (in response to carcudi)example.war/WEB-INF/jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web
PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
"http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">
<jboss-web>
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<jndi-name>java:/Mail</jndi-name>
</resource-ref>
</jboss-web>
The Tomcat distro does not include any jboss-web.xml
Regards,
Adrian -
5. Re: WAR Deployment Examples
carcudi Jan 28, 2003 10:20 AM (in response to carcudi)Pretty neat trick. And it works like a champ.
I guess for compatibility's sake, it makes good sense to put the redirect reference in its own jboss-specific xml file.
Would it have worked even if I'd added this reference in the original web.xml file. -
6. Re: WAR Deployment Examples
carcudi Jan 28, 2003 10:22 AM (in response to carcudi)Sorry, that last post was supposed to end with a question.
"Would it have worked even if I'd added this reference in the original web.xml file?" -
7. Re: WAR Deployment Examples
adrian.brock Jan 31, 2003 10:47 AM (in response to carcudi)No, jndi mapping is not part of the spec.
It is container specific.
Regards,
Adrian