tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Smits <r...@ronsmits.com>
Subject JNDI Datasource question
Date Sun, 01 Dec 2002 21:02:19 GMT
Evening

A question to grow my knowledge:)

On tomcat 4.1.12-LE-jdk14 deployment with java jsdk 1.4.1_01-b01 I have
installed the two missing jar files from commons (dbcp and pool) and
made the example from the documentation (/DBTest) work. Great work, well
written and very clear.

So my question. If I want to use DataSources I always need to change or
add Contect (or defaultContext) in the conf/server.xml? According to the
documentation I can define a Resource as:
<Context ...>
  ...
  <Resource name="jdbc/EmployeeDB" auth="Container"
            type="javax.sql.DataSource"
     description="Employees Database for HR Applications"/>
  ...
</Context>

in server.xml or as 
<resource-ref>
  <description>Employees Database for HR Applications</description>
  <res-ref-name>jdbc/EmployeeDB</res-ref-name>
  <res-ref-type>javax.sql.DataSource</res-ref-type>
  <res-auth>Container</res-auth>
</resource-ref>

int web.xml of an application that is deployed. But where to I put all
the values named in the ResourceParams entries if I want to declare them
from the web.xml file?

Ron




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message