cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1072579 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java
Date Sun, 20 Feb 2011 12:30:15 GMT
Author: aadamchik
Date: Sun Feb 20 12:30:15 2011
New Revision: 1072579

URL: http://svn.apache.org/viewvc?rev=1072579&view=rev
Log:
comment on JDBC 3 limitations
eager loop exit when registering listeners

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java?rev=1072579&r1=1072578&r2=1072579&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java
Sun Feb 20 12:30:15 2011
@@ -91,12 +91,19 @@ public class DelegatingDataSourceFactory
         if (!managedDataSources.containsKey(dataSource)) {
 
             Class<BeforeScopeEnd> annotationType = BeforeScopeEnd.class;
+
+            // note that checking for class directly prevents wrapping... will wait till
+            // Java6/JDBC4 upgrade to check for wrappers
             for (Method method : dataSource.getClass().getMethods()) {
 
                 if (method.isAnnotationPresent(annotationType)) {
                     managedDataSources.put(dataSource, new ScopeEventBinding(
                             dataSource,
                             method));
+
+                    // no need to look further as we are supporting only a single scope
+                    // method
+                    break;
                 }
             }
         }



Mime
View raw message