cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1544868 - in /cayenne/main/trunk: cayenne-server/src/main/java/org/apache/cayenne/dba/ cayenne-server/src/main/java/org/apache/cayenne/dba/db2/ cayenne-server/src/main/java/org/apache/cayenne/dba/derby/ cayenne-server/src/main/java/org/apa...
Date Sat, 23 Nov 2013 19:35:59 GMT
Author: aadamchik
Date: Sat Nov 23 19:35:58 2013
New Revision: 1544868

URL: http://svn.apache.org/r1544868
Log:
CAY-1887 Move class loading under Di, differentiate between Cayenne and application classes

ResourceLocator must be injectable... replacing hardcoded version
in JdbcAdapter with injection

Modified:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8Adapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
    cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java Sat Nov 23 19:35:58 2013
@@ -49,7 +49,6 @@ import org.apache.cayenne.map.DbRelation
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ClassLoaderResourceLocator;
 import org.apache.cayenne.resource.Resource;
 import org.apache.cayenne.resource.ResourceLocator;
 import org.apache.cayenne.util.Util;
@@ -88,15 +87,14 @@ public class JdbcAdapter implements DbAd
     public JdbcAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
 
         // init defaults
         this.setSupportsBatchUpdates(false);
         this.setSupportsUniqueConstraints(true);
         this.caseInsensitiveCollations = runtimeProperties.getBoolean(Constants.CI_PROPERTY, false);
-
-        // TODO: andrus 05.02.2010 - ideally this should be injected
-        this.resourceLocator = new ClassLoaderResourceLocator();
+        this.resourceLocator = resourceLocator;
 
         this.pkGenerator = createPkGenerator();
         this.quotingStrategy = createQuotingStrategy();

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java Sat Nov 23 19:35:58 2013
@@ -47,6 +47,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for the <a href="http://www.ibm.com/db2/"> DB2 RDBMS </a>.
@@ -61,16 +62,12 @@ import org.apache.cayenne.query.SQLActio
  */
 public class DB2Adapter extends JdbcAdapter {
 
-    public DB2Adapter(
-            @Inject RuntimeProperties runtimeProperties,
+    public DB2Adapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(
-                runtimeProperties,
-                defaultExtendedTypes,
-                userExtendedTypes,
-                extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
         setSupportsGeneratedKeys(true);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java Sat Nov 23 19:35:58 2013
@@ -42,6 +42,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.merge.MergerFactory;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for the <a href="http://db.apache.org/derby/"> Derby RDBMS
@@ -69,12 +70,14 @@ public class DerbyAdapter extends JdbcAd
             @Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories,
+                resourceLocator);
         setSupportsGeneratedKeys(true);
         setSupportsBatchUpdates(true);
     }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java Sat Nov 23 19:35:58 2013
@@ -23,13 +23,13 @@ import java.sql.Types;
 import java.util.List;
 
 import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.trans.QualifierTranslator;
+import org.apache.cayenne.access.trans.QueryAssembler;
 import org.apache.cayenne.access.types.ByteArrayType;
 import org.apache.cayenne.access.types.CharType;
 import org.apache.cayenne.access.types.ExtendedType;
 import org.apache.cayenne.access.types.ExtendedTypeFactory;
 import org.apache.cayenne.access.types.ExtendedTypeMap;
-import org.apache.cayenne.access.trans.QualifierTranslator;
-import org.apache.cayenne.access.trans.QueryAssembler;
 import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -37,7 +37,7 @@ import org.apache.cayenne.dba.TypesMappi
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.map.DbRelationship;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.firebirdsql.org">FirebirdSQL
@@ -57,12 +57,14 @@ public class FirebirdAdapter extends Jdb
     public FirebirdAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories,
+                resourceLocator);
 	    setSupportsBatchUpdates(true);
     }
     

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java Sat Nov 23 19:35:58 2013
@@ -41,6 +41,7 @@ import org.apache.cayenne.map.DbAttribut
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.frontbase.com/">FrontBase RDBMS</a>.
@@ -67,12 +68,14 @@ public class FrontBaseAdapter extends Jd
             @Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories, 
+                resourceLocator);
         setSupportsBatchUpdates(true);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java Sat Nov 23 19:35:58 2013
@@ -29,6 +29,7 @@ import org.apache.cayenne.dba.JdbcAdapte
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.merge.MergerFactory;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * @since 3.0
@@ -37,8 +38,9 @@ public class H2Adapter extends JdbcAdapt
     public H2Adapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
         setSupportsGeneratedKeys(true);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java Sat Nov 23 19:35:58 2013
@@ -39,6 +39,7 @@ import org.apache.cayenne.map.DbRelation
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for the <a href="http://hsqldb.sourceforge.net/">
@@ -57,8 +58,9 @@ public class HSQLDBAdapter extends JdbcA
     public HSQLDBAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java Sat Nov 23 19:35:58 2013
@@ -29,6 +29,7 @@ import org.apache.cayenne.configuration.
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * A flavor of HSQLDBAdapter that implements workarounds for some old driver limitations.
@@ -40,8 +41,9 @@ public class HSQLDBNoSchemaAdapter exten
     public HSQLDBNoSchemaAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
     }
 
     /**

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java Sat Nov 23 19:35:58 2013
@@ -43,6 +43,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a
@@ -63,8 +64,9 @@ public class IngresAdapter extends JdbcA
     public IngresAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
         setSupportsUniqueConstraints(true);
         setSupportsGeneratedKeys(true);
     }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java Sat Nov 23 19:35:58 2013
@@ -53,6 +53,7 @@ import org.apache.cayenne.map.DbRelation
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.mysql.com">MySQL RDBMS</a>.
@@ -87,8 +88,9 @@ public class MySQLAdapter extends JdbcAd
     public MySQLAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
 
         // init defaults
         this.storageEngine = DEFAULT_STORAGE_ENGINE;

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java Sat Nov 23 19:35:58 2013
@@ -48,6 +48,7 @@ import org.apache.cayenne.map.DbRelation
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.openbase.com">OpenBase</a>. Sample
@@ -68,12 +69,14 @@ public class OpenBaseAdapter extends Jdb
             @Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories,
+                resourceLocator);
 
         // init defaults
         this.setSupportsUniqueConstraints(false);

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8Adapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8Adapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8Adapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8Adapter.java Sat Nov 23 19:35:58 2013
@@ -33,6 +33,7 @@ import org.apache.cayenne.configuration.
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * A flavor of OracleAdapter that implements workarounds for some old driver limitations.
@@ -51,8 +52,9 @@ public class Oracle8Adapter extends Orac
     public Oracle8Adapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
     }
 
     private static void initOracle8DriverInformation() {

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java Sat Nov 23 19:35:58 2013
@@ -53,6 +53,7 @@ import org.apache.cayenne.query.InsertBa
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
 import org.apache.cayenne.query.UpdateBatchQuery;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.oracle.com">Oracle RDBMS </a>. Sample
@@ -158,12 +159,14 @@ public class OracleAdapter extends JdbcA
             @Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories,
+                resourceLocator);
 
         // enable batch updates by default
         setSupportsBatchUpdates(true);

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java Sat Nov 23 19:35:58 2013
@@ -45,6 +45,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.postgresql.org">PostgreSQL
@@ -63,8 +64,9 @@ public class PostgresAdapter extends Jdb
     public PostgresAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
         setSupportsBatchUpdates(true);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java Sat Nov 23 19:35:58 2013
@@ -36,6 +36,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * A SQLite database adapter that works with Zentus JDBC driver. See
@@ -56,12 +57,14 @@ public class SQLiteAdapter extends JdbcA
             @Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories,
+                resourceLocator);
         this.setSupportsUniqueConstraints(false);
         this.setSupportsGeneratedKeys(true);
     }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java Sat Nov 23 19:35:58 2013
@@ -34,6 +34,7 @@ import org.apache.cayenne.map.DbAttribut
 import org.apache.cayenne.merge.MergerFactory;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * Cayenne DbAdapter implementation for <a href="http://www.microsoft.com/sql/"Microsoft
@@ -77,12 +78,13 @@ public class SQLServerAdapter extends Sy
             @Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
         super(
                 runtimeProperties,
                 defaultExtendedTypes,
                 userExtendedTypes,
-                extendedTypeFactories);
+                extendedTypeFactories, resourceLocator);
 
         // TODO: i wonder if Sybase supports generated keys...
         // in this case we need to move this to the super.

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java Sat Nov 23 19:35:58 2013
@@ -40,6 +40,7 @@ import org.apache.cayenne.dba.PkGenerato
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.merge.MergerFactory;
+import org.apache.cayenne.resource.ResourceLocator;
 
 /**
  * DbAdapter implementation for <a href="http://www.sybase.com">Sybase
@@ -50,8 +51,9 @@ public class SybaseAdapter extends JdbcA
     public SybaseAdapter(@Inject RuntimeProperties runtimeProperties,
             @Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
             @Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
-            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories) {
-        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
+            @Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
+            @Inject ResourceLocator resourceLocator) {
+        super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator);
     }
 
     @Override

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java Sat Nov 23 19:35:58 2013
@@ -74,6 +74,7 @@ import org.apache.cayenne.log.CommonsJdb
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.EntitySorter;
+import org.apache.cayenne.resource.ClassLoaderResourceLocator;
 import org.apache.cayenne.resource.Resource;
 import org.apache.cayenne.resource.ResourceLocator;
 import org.apache.cayenne.resource.mock.MockResource;
@@ -98,9 +99,7 @@ public class DataDomainProviderTest exte
         nodeDescriptor1.setAdapterType(OracleAdapter.class.getName());
         nodeDescriptor1.setDataSourceFactoryType(MockDataSourceFactory.class.getName());
         nodeDescriptor1.setParameters("jdbc/testDataNode1");
-        nodeDescriptor1
-                .setSchemaUpdateStrategyType(ThrowOnPartialOrCreateSchemaStrategy.class
-                        .getName());
+        nodeDescriptor1.setSchemaUpdateStrategyType(ThrowOnPartialOrCreateSchemaStrategy.class.getName());
         testDescriptor.getNodeDescriptors().add(nodeDescriptor1);
 
         DataNodeDescriptor nodeDescriptor2 = new DataNodeDescriptor();
@@ -109,9 +108,16 @@ public class DataDomainProviderTest exte
         nodeDescriptor2.setParameters("testDataNode2.driver.xml");
         testDescriptor.getNodeDescriptors().add(nodeDescriptor2);
 
-        final ResourceLocator locator = new ResourceLocator() {
+        final ResourceLocator locator = new ClassLoaderResourceLocator() {
 
             public Collection<Resource> findResources(String name) {
+                // ResourceLocator also used by JdbcAdapter to locate
+                // types.xml... if this is the request we are getting, just let
+                // it go through..
+                if (name.endsWith("types.xml")) {
+                   return super.findResources(name);
+                }
+                
                 assertEquals(testConfigName, name);
                 return Collections.<Resource> singleton(new MockResource());
             }
@@ -119,8 +125,8 @@ public class DataDomainProviderTest exte
 
         final DataChannelDescriptorLoader testLoader = new DataChannelDescriptorLoader() {
 
-            public ConfigurationTree<DataChannelDescriptor> load(
-                    Resource configurationResource) throws ConfigurationException {
+            public ConfigurationTree<DataChannelDescriptor> load(Resource configurationResource)
+                    throws ConfigurationException {
                 return new ConfigurationTree<DataChannelDescriptor>(testDescriptor, null);
             }
         };
@@ -132,49 +138,36 @@ public class DataDomainProviderTest exte
             public void configure(Binder binder) {
                 final AdhocObjectFactory objectFactory = new DefaultAdhocObjectFactory();
                 binder.bind(AdhocObjectFactory.class).toInstance(objectFactory);
-                
+
                 binder.bindMap(Constants.PROPERTIES_MAP);
-                
-                binder
-                        .bindList(Constants.SERVER_ADAPTER_DETECTORS_LIST)
-                        .add(new OpenBaseSniffer(objectFactory))
-                        .add(new FrontBaseSniffer(objectFactory))
-                        .add(new IngresSniffer(objectFactory))
-                        .add(new SQLiteSniffer(objectFactory))
-                        .add(new DB2Sniffer(objectFactory))
-                        .add(new H2Sniffer(objectFactory))
-                        .add(new HSQLDBSniffer(objectFactory))
-                        .add(new SybaseSniffer(objectFactory))
-                        .add(new DerbySniffer(objectFactory))
-                        .add(new SQLServerSniffer(objectFactory))
-                        .add(new OracleSniffer(objectFactory))
-                        .add(new PostgresSniffer(objectFactory))
-                        .add(new MySQLSniffer(objectFactory));
+
+                binder.bindList(Constants.SERVER_ADAPTER_DETECTORS_LIST).add(new OpenBaseSniffer(objectFactory))
+                        .add(new FrontBaseSniffer(objectFactory)).add(new IngresSniffer(objectFactory))
+                        .add(new SQLiteSniffer(objectFactory)).add(new DB2Sniffer(objectFactory))
+                        .add(new H2Sniffer(objectFactory)).add(new HSQLDBSniffer(objectFactory))
+                        .add(new SybaseSniffer(objectFactory)).add(new DerbySniffer(objectFactory))
+                        .add(new SQLServerSniffer(objectFactory)).add(new OracleSniffer(objectFactory))
+                        .add(new PostgresSniffer(objectFactory)).add(new MySQLSniffer(objectFactory));
                 binder.bindList(Constants.SERVER_DOMAIN_FILTERS_LIST);
                 binder.bindList(Constants.SERVER_PROJECT_LOCATIONS_LIST).add(testConfigName);
-                
+
                 // configure extended types
                 binder.bindList(Constants.SERVER_DEFAULT_TYPES_LIST);
-                binder.bindList(Constants.SERVER_USER_TYPES_LIST);        
+                binder.bindList(Constants.SERVER_USER_TYPES_LIST);
                 binder.bindList(Constants.SERVER_TYPE_FACTORIES_LIST);
-                
+
                 binder.bind(EventManager.class).toInstance(eventManager);
                 binder.bind(EntitySorter.class).toInstance(new AshwoodEntitySorter());
                 binder.bind(ResourceLocator.class).toInstance(locator);
-                binder.bind(ConfigurationNameMapper.class).to(
-                        DefaultConfigurationNameMapper.class);
-                binder.bind(DataChannelDescriptorMerger.class).to(
-                        DefaultDataChannelDescriptorMerger.class);
+                binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
+                binder.bind(DataChannelDescriptorMerger.class).to(DefaultDataChannelDescriptorMerger.class);
                 binder.bind(DataChannelDescriptorLoader.class).toInstance(testLoader);
-                binder.bind(SchemaUpdateStrategy.class).toInstance(
-                        new SkipSchemaUpdateStrategy());
+                binder.bind(SchemaUpdateStrategy.class).toInstance(new SkipSchemaUpdateStrategy());
                 binder.bind(DbAdapterFactory.class).to(DefaultDbAdapterFactory.class);
                 binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
-                binder.bind(BatchQueryBuilderFactory.class).to(
-                        DefaultBatchQueryBuilderFactory.class);
+                binder.bind(BatchQueryBuilderFactory.class).to(DefaultBatchQueryBuilderFactory.class);
 
-                binder.bind(DataSourceFactory.class).toInstance(
-                        new MockDataSourceFactory());
+                binder.bind(DataSourceFactory.class).toInstance(new MockDataSourceFactory());
                 binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
                 binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                 binder.bind(QueryCache.class).toInstance(mock(QueryCache.class));
@@ -204,17 +197,13 @@ public class DataDomainProviderTest exte
         assertEquals(1, node1.getDataMaps().size());
         assertSame(map1, node1.getDataMaps().iterator().next());
         assertSame(node1, domain.lookupDataNode(map1));
-        assertEquals(nodeDescriptor1.getDataSourceFactoryType(), node1
-                .getDataSourceFactory());
+        assertEquals(nodeDescriptor1.getDataSourceFactoryType(), node1.getDataSourceFactory());
         assertNotNull(node1.getDataSource());
         assertEquals(nodeDescriptor1.getParameters(), node1.getDataSourceLocation());
 
-        assertEquals(nodeDescriptor1.getSchemaUpdateStrategyType(), node1
-                .getSchemaUpdateStrategyName());
+        assertEquals(nodeDescriptor1.getSchemaUpdateStrategyType(), node1.getSchemaUpdateStrategyName());
         assertNotNull(node1.getSchemaUpdateStrategy());
-        assertEquals(nodeDescriptor1.getSchemaUpdateStrategyType(), node1
-                .getSchemaUpdateStrategy()
-                .getClass()
+        assertEquals(nodeDescriptor1.getSchemaUpdateStrategyType(), node1.getSchemaUpdateStrategy().getClass()
                 .getName());
 
         assertNotNull(node1.getAdapter());
@@ -228,13 +217,9 @@ public class DataDomainProviderTest exte
         assertNull(node2.getDataSourceFactory());
         assertNotNull(node2.getDataSource());
         assertEquals(nodeDescriptor2.getParameters(), node2.getDataSourceLocation());
-        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2
-                .getSchemaUpdateStrategyName());
+        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2.getSchemaUpdateStrategyName());
         assertNotNull(node2.getSchemaUpdateStrategy());
-        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2
-                .getSchemaUpdateStrategy()
-                .getClass()
-                .getName());
+        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2.getSchemaUpdateStrategy().getClass().getName());
 
         assertNotNull(node2.getAdapter());
     }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java Sat Nov 23 19:35:58 2013
@@ -46,6 +46,8 @@ import org.apache.cayenne.di.spi.Default
 import org.apache.cayenne.log.CommonsJdbcEventLogger;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.resource.ClassLoaderResourceLocator;
+import org.apache.cayenne.resource.ResourceLocator;
 
 import com.mockrunner.mock.jdbc.MockConnection;
 import com.mockrunner.mock.jdbc.MockDataSource;
@@ -105,6 +107,7 @@ public class DefaultDbAdapterFactoryTest
 
                 binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                 binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
+                binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
                 binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
                 binder.bind(BatchQueryBuilderFactory.class).toInstance(mock(BatchQueryBuilderFactory.class));
             }
@@ -138,6 +141,7 @@ public class DefaultDbAdapterFactoryTest
 
                 binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                 binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
+                binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
                 binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
                 binder.bind(BatchQueryBuilderFactory.class).toInstance(mock(BatchQueryBuilderFactory.class));
             }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java Sat Nov 23 19:35:58 2013
@@ -21,8 +21,6 @@ package org.apache.cayenne.unit.di.serve
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 
-import javax.sql.DataSource;
-
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.access.DataNode;
@@ -80,6 +78,8 @@ import org.apache.cayenne.di.spi.Default
 import org.apache.cayenne.log.CommonsJdbcEventLogger;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.map.EntityResolver;
+import org.apache.cayenne.resource.ClassLoaderResourceLocator;
+import org.apache.cayenne.resource.ResourceLocator;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.unit.DB2UnitDbAdapter;
 import org.apache.cayenne.unit.DerbyUnitDbAdapter;
@@ -203,6 +203,7 @@ public class ServerCaseModule implements
         binder.bind(ServerCaseDataSourceFactory.class).to(
                 ServerCaseDataSourceFactory.class);
         binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
+        binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
         binder.bind(ObjectStoreFactory.class).to(DefaultObjectStoreFactory.class);
 
         // test-scoped objects

Modified: cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java?rev=1544868&r1=1544867&r2=1544868&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java (original)
+++ cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java Sat Nov 23 19:35:58 2013
@@ -45,6 +45,8 @@ import org.apache.cayenne.di.Module;
 import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
 import org.apache.cayenne.log.CommonsJdbcEventLogger;
 import org.apache.cayenne.log.JdbcEventLogger;
+import org.apache.cayenne.resource.ClassLoaderResourceLocator;
+import org.apache.cayenne.resource.ResourceLocator;
 import org.apache.commons.logging.Log;
 
 /**
@@ -79,6 +81,7 @@ public class ToolsModule implements Modu
 
         AdhocObjectFactory objectFactory = new DefaultAdhocObjectFactory();
         binder.bind(AdhocObjectFactory.class).toInstance(objectFactory);
+        binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
 
         binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
         binder.bind(BatchQueryBuilderFactory.class).to(DefaultBatchQueryBuilderFactory.class);



Mime
View raw message