mandatory: define the attributes in <Context><Resource> in 
applicationContext.xml 
OR
optionally define the resource attributes <resource-env-ref> or <resource-ref> 
in web.xml

http://proteinbank.vbi.vt.edu/tomcat-docs/config/context.html#Resource%20Definitions
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Mon, 31 Aug 2009 00:42:15 +0200
> Subject: Is resource-ref really needed?
> From: robert.wh...@gmail.com
> To: users@tomcat.apache.org
> 
> Hi,
> I'm using Tomcat 6.20 and have configured a datasource in
> META-INF/context.xml, which looks basically like this:
> 
> <?xml version="1.0"?>
> <Context reloadable="false">
>    <Resource
>       name="jdbc/mydb"
>       factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
>       type="javax.sql.DataSource"
>       scope="Shareable"
>       auth="Container"
>    />
> </Context>
> 
> For brevity I have removed some attributes, but this is basically my
> definition.
> 
> I can now just directly look up this DataSource using JDNI under the
> java:comp/env/jdbc/mydb name. However according to
> http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
> I need to add a resource-ref element to my web.xml. I didn't do that
> and it still works. Am I missing something? What's the purpose of
> resource-ref anyway?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009

Reply via email to