tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kennedy" <>
Subject Resource references
Date Fri, 23 May 2003 19:11:46 GMT
One of the main reasons of using resource ref's in code is because you get a level of indirection.
 I see that level of indirection in the J2EE ref impl from Sun, but I don't see that in Tomcat.
 How can you specify a datasource (let's say) in the web.xml as a res ref different than the
one setup in the server.xml.  Is this possible?

Here's an example:
<resource-ref id="mail1">

<description>This is used to send email</description>







<Resource name="mail/bay4" auth="Container" type="javax.mail.Session"/> 

<ResourceParams name="mail/bay4"> 

<parameter> <name></name> 




mail/bay4 has to match everywhere, right?  Anyway, this all works just fine for me.  This
question is more one of what seems to be inconsistencies.

Jim Kennedy
IT Consultant

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message