|
Craig McClanahan made changes - 13/Aug/06 06:28 AM
sean schofield made changes - 21/Aug/06 11:28 PM
Jeff Turner made changes - 09/Aug/07 07:17 AM
Antonio Petrelli made changes - 08/Jan/09 08:56 AM
Antonio Petrelli made changes - 08/Jan/09 09:08 AM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
* Installed a copy of derbyclient.jar into the common/lib
directory of my Tomcat 5.5.17 installation (since the
sample database I had handy was the "Travel Center"
example that ships with Java Studio Creator 2 Update 1).
* Built a small webapp with the following META-INF/context.xml file:
<Context path="/my-jndi-test">
<Resource name="jdbc/travel" auth="Container" type="java.sql.DataSource"
maxActive="8" maxIdle="4" maxWait="10000" username="travel" password="travel"
driverClassName="org.apache.derby.jdbc.ClientDriver"
url="jdbc:derby://localhost:21527/sample"/>
</Context>
* Inside the application, I evaluated the expression "#{jndi['jdbc/travel']}",
and I got back a non-null instance of type "org.apache.tomcat.dbcp.dbcp.BasicDataSource"
which is exactly what I would expect (this is the wrapper class Tomcat 5.5 uses
around data sources you define like this.
So, as far as I can tell, this feature works as it is supposed to. If anyone can provide a reproducible test case where this does not work, please reopen this issue and attach your example as an attachment.