you can enter a documentation change to correct either
1)duplicate behaviour of ApplicationContext.xml <Resource> by web.xml 
<resource-ref> 
2)or make the documentation a bit clearer on what is required and what is 
optional

the doc states:
You CAN declare the characteristics of the resource
    to be returned for JNDI lookups of <resource-ref> and
    <resource-env-ref> elements in the web application
    deployment descriptor. 
mg>interpreted as web.xml <resource-ref> is optional, <resource-env-ref> is 
optional

You MUST also define
    the needed resource parameters as attributes of the Resource 
    element, to configure the object factory to be used (if not known to Tomcat 
    already), and the properties used to configure that object factory.


    mg>i interpret this as <Context><Resource> parameter is mandatory

https://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%206

thanks,
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 01:36:47 +0200
> Subject: Re: Is resource-ref really needed?
> From: robert.wh...@gmail.com
> To: users@tomcat.apache.org
> 
> Hi,
> 
> On Mon, Aug 31, 2009 at 1:12 AM, Martin Gainty<mgai...@hotmail.com> wrote:
> >
> > 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
> 
> Thanks for the reply, I was just looking at the same information here:
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource%20Definitions
> 
> But aren't all examples uhm, a bit wrong then? Since they all define
> those attributes in <Context><Resource> in context.xml
> (applicationContext.xml?) as well as in <resource-ref> in web.xml. But
> if I understand correctly you can leave out the attributes auth,
> description and type from <Context><Resource> and put just these 3 in
> <resource-ref> in web.xml? If you put all of those in
> <Context><Resource> in context.xml then indeed no resource-ref is
> needed?
> 
> I still find this a little awkward, even 'authoritative' documentation
> like this one: 
> http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
> uses both resource-ref or resource-env-ref in web.xml but uses the
> attributes auth and type anyway in context.xml. Only description is
> consistently only used in web.xml for all examples, but it seems a bit
> silly to teach developers to create and maintain those entries in
> web.xml, only for this description element that 99% of the actual code
> doesn't see nor uses.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

Reply via email to