tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siggelkow, Bill" <>
Subject RE: Data source usage
Date Mon, 11 Aug 2003 13:49:12 GMT
I believe you want to use the JNDI name from the web.xml -- e.g. "jdbc/test".

Following is from the JSTL spec:

The first way [to specify a DataSource] is through a JNDI relative path, assuming a container
JNDI. For example, with the absolute JNDI resource path java:comp/env/jdbc/
myDatabase, the JNDI relative path to the data source resource would simply be
jdbc/myDatabase, given that java:comp/env is the standard JNDI root for a
J2EE application.

-----Original Message-----
From: p@zdzior []
Sent: Saturday, August 09, 2003 2:09 PM
Subject: Data source usage


I have defined a data source in my server xml file:

          <Resource name="jdbc/test"

          <ResourceParams name="jdbc/test">

            <!-- Maximum number of dB connections in pool. Make sure you
                 configure your mysqld max_connections large enough to handle
                 all of your db connections. Set to 0 for no limit.

            <!-- Maximum number of idle dB connections to retain in pool.
                 Set to 0 for no limit.

            <!-- Maximum time to wait for a dB connection to become available
                 in ms, in this example 10 seconds. An Exception is thrown if
                 this timeout is exceeded.  Set to -1 to wait indefinitely.
            <!-- MySQL dB username and password for dB connections  -->

            <!-- Class name for mm.mysql JDBC driver -->
            <!-- The JDBC connection url for connecting to your MySQL dB.
                 The autoReconnect=true argument to the url makes sure that the
                 mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
                 connection.  mysqld by default closes idle connections after 8 hours.

then I have defined a reference in web.xml file of my application:

      <description>DB Connection</description>

I would like to use it with jstl tag libray <sql>,
Could anyboty tell my what should I write 
into the datasource value:
<sql:transaction dataSource="${???}">
to make it working?

or shall I define it somehow?


View raw message