You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "Craig McClanahan (JIRA)" <ji...@apache.org> on 2006/08/13 08:30:21 UTC
[jira] Resolved: (SHALE-253) JNDI access to data sources configured
in Tomcat returns null
[ http://issues.apache.org/struts/browse/SHALE-253?page=all ]
Craig McClanahan resolved SHALE-253.
------------------------------------
Resolution: Cannot Reproduce
I was unable to reproduce this problem. Indeed, I was able to build up a scenario that showed the JNDI evaluation through a value binding actually worked. Here's what I did:
* 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.
> JNDI access to data sources configured in Tomcat returns null
> -------------------------------------------------------------
>
> Key: SHALE-253
> URL: http://issues.apache.org/struts/browse/SHALE-253
> Project: Shale
> Issue Type: Bug
> Components: Core
> Reporter: Craig McClanahan
> Fix For: 1.0.3-SNAPSHOT
>
>
> There was a report on the user mailing list that accessing JNDI via el expressions does not acquire data sources configured in Tomcat. This needs to be tested and, if it fails, fixed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira