tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kennedy" <>
Subject Resource Reference and server.xml
Date Thu, 05 Jun 2003 15:02:37 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.  But I
would like to disconnect the reference I use IN CODE, from the resourceparam used in the server.xml.
 This way I can change the server.xml without affecting the deployed WAR file.  You can do
this with SUN's Ref impl for the J2EE.

Jim Kennedy
IT Consultant

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