Author: fhanik
Date: Wed Mar 25 17:46:13 2009
New Revision: 758363

URL: http://svn.apache.org/viewvc?rev=758363&view=rev
Log:
Allow the type to be the exact name of the data source

Modified:
    
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java?rev=758363&r1=758362&r2=758363&view=diff
==============================================================================
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
 Wed Mar 25 17:46:13 2009
@@ -172,9 +172,20 @@
             return null;
         }
         Reference ref = (Reference) obj;
-        if (!"javax.sql.DataSource".equals(ref.getClassName())) {
+        
+        boolean ok = false;
+        if ("javax.sql.DataSource".equals(ref.getClassName())) {
+            ok = true;
+        }
+        if 
(org.apache.tomcat.jdbc.pool.DataSource.class.getName().equals(ref.getClassName()))
 {
+            ok = true;
+        }
+        
+        if (!ok) {
+            log.warn(ref.getClassName()+" is not a valid class name/type for 
this JNDI factory.");
             return null;
         }
+        
 
         Properties properties = new Properties();
         for (int i = 0; i < ALL_PROPERTIES.length; i++) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to