cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1296128 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/cache/ main/java/org/apache/cayenne/configuration/ main/java/org/apache/cayenne/configuration/rop/...
Date Fri, 02 Mar 2012 10:50:33 GMT
Author: aadamchik
Date: Fri Mar  2 10:50:32 2012
New Revision: 1296128

URL: http://svn.apache.org/viewvc?rev=1296128&view=rev
Log:
CAY-1665 Consistent and concise property names aggregated in one place

defining runtime properties

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DefaultObjectMapRetainStrategy.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectMapRetainStrategy.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/MapQueryCacheProvider.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/CayenneContextFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientChannelProvider.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientModule.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/HessianConnectionProvider.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DelegatingDataSourceFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/PropertyDataSourceFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/rop/client/ClientModuleTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/server/DefaultDataSourceFactoryLoaderTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DefaultObjectMapRetainStrategy.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DefaultObjectMapRetainStrategy.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DefaultObjectMapRetainStrategy.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DefaultObjectMapRetainStrategy.java Fri Mar  2 10:50:32 2012
@@ -20,7 +20,9 @@ package org.apache.cayenne.access;
 
 import java.util.Map;
 
+import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.Persistent;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.Inject;
 import org.apache.commons.collections.map.AbstractReferenceMap;
@@ -32,24 +34,32 @@ import org.apache.commons.collections.ma
  * @since 3.1
  */
 public class DefaultObjectMapRetainStrategy implements ObjectMapRetainStrategy {
-    
+
+    private static final String WEAK_RETAIN_STRATEGY = "weak";
+    private static final String SOFT_RETAIN_STRATEGY = "soft";
+    private static final String HARD_RETAIN_STRATEGY = "hard";
+
     protected RuntimeProperties runtimeProperties;
-    
+
     public DefaultObjectMapRetainStrategy(@Inject RuntimeProperties runtimeProperties) {
         this.runtimeProperties = runtimeProperties;
     }
 
     public Map<Object, Persistent> createObjectMap() {
-        String retainStrategy = runtimeProperties.get(MAP_RETAIN_STRATEGY_PROPERTY);
-        
-        if (SOFT_RETAIN_STRATEGY.equals(retainStrategy)) {
+        String strategy = runtimeProperties
+                .get(Constants.SERVER_OBJECT_RETAIN_STRATEGY_PROPERTY);
+
+        if (strategy == null || WEAK_RETAIN_STRATEGY.equals(strategy)) {
+            return new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK);
+        }
+        else if (SOFT_RETAIN_STRATEGY.equals(strategy)) {
             return new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT);
         }
-        else if (HARD_RETAIN_STRATEGY.equals(retainStrategy)) {
+        else if (HARD_RETAIN_STRATEGY.equals(strategy)) {
             return new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.HARD);
         }
         else {
-            return new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK);
+            throw new CayenneRuntimeException("Unsupported retain strategy " + strategy);
         }
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectMapRetainStrategy.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectMapRetainStrategy.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectMapRetainStrategy.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectMapRetainStrategy.java Fri Mar  2 10:50:32 2012
@@ -23,19 +23,12 @@ import java.util.Map;
 import org.apache.cayenne.Persistent;
 
 /**
- * A strategy for retaining objects in {@link ObjectStore}. May be used
- * weak, soft or hard references. 
+ * A strategy for retaining objects in {@link ObjectStore}. The strategy can be weak, soft
+ * or hard references.
  * 
  * @since 3.1
  */
 public interface ObjectMapRetainStrategy {
-    
-    static final String MAP_RETAIN_STRATEGY_PROPERTY = "org.apache.cayenne.context_object_retain_strategy";
-    
-    static final String WEAK_RETAIN_STRATEGY = "weak";
-    static final String SOFT_RETAIN_STRATEGY = "soft";
-    static final String HARD_RETAIN_STRATEGY = "hard";
-    
-    Map<Object, Persistent> createObjectMap();
 
+    Map<Object, Persistent> createObjectMap();
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/MapQueryCacheProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/MapQueryCacheProvider.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/MapQueryCacheProvider.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/cache/MapQueryCacheProvider.java Fri Mar  2 10:50:32 2012
@@ -19,6 +19,7 @@
 package org.apache.cayenne.cache;
 
 import org.apache.cayenne.ConfigurationException;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Provider;
@@ -28,8 +29,6 @@ import org.apache.cayenne.di.Provider;
  */
 public class MapQueryCacheProvider implements Provider<QueryCache> {
 
-    public static final String CACHE_SIZE_PROPERTY = "cayenne.MapQueryCacheFactory.cacheSize";
-
     protected RuntimeProperties properties;
 
     public MapQueryCacheProvider(@Inject RuntimeProperties properties) {
@@ -39,7 +38,7 @@ public class MapQueryCacheProvider imple
     public QueryCache get() throws ConfigurationException {
 
         int size = properties.getInt(
-                CACHE_SIZE_PROPERTY,
+                Constants.QUERY_CACHE_SIZE_PROPERTY,
                 MapQueryCache.DEFAULT_CACHE_SIZE);
         return new MapQueryCache(size);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java Fri Mar  2 10:50:32 2012
@@ -69,4 +69,53 @@ public interface Constants {
      */
     public static final String SERVER_TYPE_FACTORIES_LIST = "cayenne.server.type_factories";
 
+    // Runtime properties
+
+    public static final String JDBC_DRIVER_PROPERTY = "cayenne.jdbc.driver";
+
+    public static final String JDBC_URL_PROPERTY = "cayenne.jdbc.url";
+
+    public static final String JDBC_USERNAME_PROPERTY = "cayenne.jdbc.username";
+
+    public static final String JDBC_PASSWORD_PROPERTY = "cayenne.jdbc.password";
+
+    public static final String JDBC_MIN_CONNECTIONS_PROPERTY = "cayenne.jdbc.min_connections";
+
+    public static final String JDBC_MAX_CONNECTIONS_PROPERTY = "cayenne.jdbc.max_connections";
+
+    /**
+     * An integer property defining the maximum number of entries in the query cache. Note
+     * that not all QueryCache providers may respect this property. MapQueryCache uses it,
+     * but the rest would use alternative configuration methods.
+     */
+    public static final String QUERY_CACHE_SIZE_PROPERTY = "cayenne.querycache.size";
+
+    /**
+     * A boolean property defining whether cross-contexts synchronization is enabled.
+     * Possible values are "true" or "false".
+     */
+    public static final String SERVER_CONTEXTS_SYNC_PROPERTY = "cayenne.server.contexts_sync_strategy";
+
+    /**
+     * A String property that defines how ObjectContexts should retain cached committed
+     * objects. Possible values are "weak", "soft", "hard".
+     */
+    public static final String SERVER_OBJECT_RETAIN_STRATEGY_PROPERTY = "cayenne.server.object_retain_strategy";
+
+    public static final String ROP_SERVICE_URL_PROPERTY = "cayenne.rop.service_url";
+
+    public static final String ROP_SERVICE_USERNAME_PROPERTY = "cayenne.rop.service_username";
+
+    public static final String ROP_SERVICE_PASSWORD_PROPERTY = "cayenne.rop.service_password ";
+
+    public static final String ROP_SERVICE_SHARED_SESSION_PROPERTY = "cayenne.rop.shared_session_name";
+
+    public static final String ROP_SERVICE_TIMEOUT_PROPERTY = "cayenne.rop.service.timeout";
+
+    public static final String ROP_CHANNEL_EVENTS_PROPERTY = "cayenne.rop.channel_events";
+
+    public static final String ROP_CONTEXT_CHANGE_EVENTS_PROPERTY = "cayenne.rop.context_change_events";
+
+    public static final String ROP_CONTEXT_LIFECYCLE_EVENTS_PROPERTY = "cayenne.rop.context_lifecycle_events";
+
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java Fri Mar  2 10:50:32 2012
@@ -40,7 +40,7 @@ public class DefaultObjectStoreFactory i
     protected ObjectMapRetainStrategy retainStrategy;
     
     public ObjectStore createObjectStore(DataRowStore dataRowCache) {
-        boolean sync = runtimeProperties.getBoolean(SYNC_PROPERTY, true);
+        boolean sync = runtimeProperties.getBoolean(Constants.SERVER_CONTEXTS_SYNC_PROPERTY, true);
         
         return sync ? new ObjectStore(dataRowCache, retainStrategy.createObjectMap()) 
                 : new NoSyncObjectStore(dataRowCache, retainStrategy.createObjectMap());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java Fri Mar  2 10:50:32 2012
@@ -28,8 +28,6 @@ import org.apache.cayenne.access.ObjectS
  */
 public interface ObjectStoreFactory {
     
-    static final String SYNC_PROPERTY = "org.apache.cayenne.sync_contexts";
-    
     /**
      * Creates an {@link ObjectStore} with provided dataRowCache
      */

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/CayenneContextFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/CayenneContextFactory.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/CayenneContextFactory.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/CayenneContextFactory.java Fri Mar  2 10:50:32 2012
@@ -23,6 +23,7 @@ import org.apache.cayenne.DataChannel;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.cache.NestedQueryCache;
 import org.apache.cayenne.cache.QueryCache;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.ObjectContextFactory;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.Inject;
@@ -48,11 +49,11 @@ public class CayenneContextFactory imple
 
     public ObjectContext createContext(DataChannel parent) {
         boolean changeEvents = properties.getBoolean(
-                ClientModule.CONTEXT_CHANGE_EVENTS,
+                Constants.ROP_CONTEXT_CHANGE_EVENTS_PROPERTY,
                 false);
 
         boolean lifecycleEvents = properties.getBoolean(
-                ClientModule.CONTEXT_LIFECYCLE_EVENTS,
+                Constants.ROP_CONTEXT_LIFECYCLE_EVENTS_PROPERTY,
                 false);
 
         CayenneContext context = newInstance(parent, changeEvents, lifecycleEvents);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientChannelProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientChannelProvider.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientChannelProvider.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientChannelProvider.java Fri Mar  2 10:50:32 2012
@@ -20,6 +20,7 @@ package org.apache.cayenne.configuration
 
 import org.apache.cayenne.ConfigurationException;
 import org.apache.cayenne.DataChannel;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Provider;
@@ -41,17 +42,9 @@ public class ClientChannelProvider imple
     public DataChannel get() throws ConfigurationException {
 
         boolean channelEvents = properties.getBoolean(
-                ClientModule.CHANNEL_EVENTS,
+                Constants.ROP_CHANNEL_EVENTS_PROPERTY,
                 false);
 
-        boolean remoteEventsOptional = properties.getBoolean(
-                ClientModule.CHANNEL_REMOTE_EVENTS_OPTIONAL,
-                false);
-
-        return new ClientChannel(
-                connection,
-                channelEvents,
-                eventManager,
-                remoteEventsOptional);
+        return new ClientChannel(connection, channelEvents, eventManager, channelEvents);
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientModule.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientModule.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/ClientModule.java Fri Mar  2 10:50:32 2012
@@ -40,20 +40,6 @@ import org.apache.cayenne.remote.ClientC
  */
 public class ClientModule implements Module {
 
-    public static final String ROP_SERVICE_URL = "cayenne.config.rop.service.url";
-    public static final String ROP_SERVICE_USER_NAME = "cayenne.config.rop.service.username";
-    public static final String ROP_SERVICE_PASSWORD = "cayenne.config.rop.service.password";
-    public static final String ROP_SERVICE_SHARED_SESSION = "cayenne.config.rop.service.shared_session";
-    public static final String ROP_SERVICE_TIMEOUT = "cayenne.config.rop.service.timeout";
-
-    public static final String CHANNEL_EVENTS = "cayenne.config.rop.client.channel.events";
-
-    // TODO: this property name is exactly the same as CHANNEL_EVENTS... Seems messed up
-    public static final String CHANNEL_REMOTE_EVENTS_OPTIONAL = "cayenne.config.rop.client.channel.events";
-
-    public static final String CONTEXT_CHANGE_EVENTS = "cayenne.config.rop.client.context.change_events";
-    public static final String CONTEXT_LIFECYCLE_EVENTS = "cayenne.config.rop.client.context.lifecycle_events";
-
     protected Map<String, String> properties;
 
     public ClientModule(Map<String, String> properties) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/HessianConnectionProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/HessianConnectionProvider.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/HessianConnectionProvider.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/rop/client/HessianConnectionProvider.java Fri Mar  2 10:50:32 2012
@@ -19,6 +19,7 @@
 package org.apache.cayenne.configuration.rop.client;
 
 import org.apache.cayenne.ConfigurationException;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Provider;
@@ -32,23 +33,26 @@ public class HessianConnectionProvider i
 
     public ClientConnection get() throws ConfigurationException {
 
-        String url = runtimeProperties.get(ClientModule.ROP_SERVICE_URL);
+        String url = runtimeProperties.get(Constants.ROP_SERVICE_URL_PROPERTY);
         if (url == null) {
             throw new ConfigurationException(
                     "No property defined for '%s', can't initialize HessianConnection",
-                    ClientModule.ROP_SERVICE_URL);
+                    Constants.ROP_SERVICE_URL_PROPERTY);
         }
 
-        String userName = runtimeProperties
-                .get(ClientModule.ROP_SERVICE_USER_NAME);
-        String password = runtimeProperties.get(ClientModule.ROP_SERVICE_PASSWORD);
+        String userName = runtimeProperties.get(Constants.ROP_SERVICE_USERNAME_PROPERTY);
+        String password = runtimeProperties.get(Constants.ROP_SERVICE_PASSWORD_PROPERTY);
         String sharedSession = runtimeProperties
-                .get(ClientModule.ROP_SERVICE_SHARED_SESSION);
+                .get(Constants.ROP_SERVICE_SHARED_SESSION_PROPERTY);
         String readTimeoutStr = runtimeProperties
-                .get(ClientModule.ROP_SERVICE_TIMEOUT);
-        
-        HessianConnection result = new HessianConnection(url, userName, password, sharedSession);
-        
+                .get(Constants.ROP_SERVICE_TIMEOUT_PROPERTY);
+
+        HessianConnection result = new HessianConnection(
+                url,
+                userName,
+                password,
+                sharedSession);
+
         if (readTimeoutStr != null && readTimeoutStr.length() != 0) {
             result.setReadTimeout(Long.parseLong(readTimeoutStr));
         }

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=1296128&r1=1296127&r2=1296128&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 Fri Mar  2 10:50:32 2012
@@ -25,6 +25,7 @@ import java.util.concurrent.ConcurrentHa
 import javax.sql.DataSource;
 
 import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.AdhocObjectFactory;
@@ -139,10 +140,10 @@ public class DelegatingDataSourceFactory
                 ? nodeDescriptor.getDataChannelDescriptor().getName()
                 : null;
 
-        String driver = properties.get(PropertyDataSourceFactory.JDBC_DRIVER_PROPERTY);
+        String driver = properties.get(Constants.JDBC_DRIVER_PROPERTY);
 
         if (driver == null && channelName != null) {
-            driver = properties.get(PropertyDataSourceFactory.JDBC_DRIVER_PROPERTY
+            driver = properties.get(Constants.JDBC_DRIVER_PROPERTY
                     + "."
                     + nodeDescriptor.getDataChannelDescriptor().getName()
                     + "."
@@ -153,10 +154,10 @@ public class DelegatingDataSourceFactory
             return false;
         }
 
-        String url = properties.get(PropertyDataSourceFactory.JDBC_URL_PROPERTY);
+        String url = properties.get(Constants.JDBC_URL_PROPERTY);
 
         if (url == null && channelName != null) {
-            url = properties.get(PropertyDataSourceFactory.JDBC_URL_PROPERTY
+            url = properties.get(Constants.JDBC_URL_PROPERTY
                     + "."
                     + nodeDescriptor.getDataChannelDescriptor().getName()
                     + "."

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/PropertyDataSourceFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/PropertyDataSourceFactory.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/PropertyDataSourceFactory.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/PropertyDataSourceFactory.java Fri Mar  2 10:50:32 2012
@@ -21,6 +21,7 @@ package org.apache.cayenne.configuration
 import javax.sql.DataSource;
 
 import org.apache.cayenne.ConfigurationException;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.conn.PoolManager;
@@ -29,12 +30,11 @@ import org.apache.cayenne.log.JdbcEventL
 
 /**
  * A DataSourceFactrory that creates a DataSource based on system properties. Properties
- * can be set per domain/node name or globally, aplying to all nodes without explicit
+ * can be set per domain/node name or globally, applying to all nodes without explicit
  * property set. The following properties are supported:
  * <ul>
  * <li>cayenne.jdbc.driver[.domain_name.node_name]
  * <li>cayenne.jdbc.url[.domain_name.node_name]
- * <li>cayenne.adapter[.domain_name.node_name]
  * <li>cayenne.jdbc.username[.domain_name.node_name]
  * <li>cayenne.jdbc.password[.domain_name.node_name]
  * <li>cayenne.jdbc.min.connections[.domain_name.node_name]
@@ -47,16 +47,9 @@ import org.apache.cayenne.log.JdbcEventL
  */
 public class PropertyDataSourceFactory implements DataSourceFactory {
 
-    static final String JDBC_DRIVER_PROPERTY = "cayenne.jdbc.driver";
-    static final String JDBC_URL_PROPERTY = "cayenne.jdbc.url";
-    static final String JDBC_USERNAME_PROPERTY = "cayenne.jdbc.username";
-    static final String JDBC_PASSWORD_PROPERTY = "cayenne.jdbc.password";
-    static final String JDBC_MIN_CONNECTIONS_PROPERTY = "cayenne.jdbc.min.connections";
-    static final String JDBC_MAX_CONNECTIONS_PROPERTY = "cayenne.jdbc.max.conections";
-
     @Inject
     protected RuntimeProperties properties;
-    
+
     @Inject
     protected JdbcEventLogger jdbcEventLogger;
 
@@ -67,12 +60,18 @@ public class PropertyDataSourceFactory i
                 + "."
                 + nodeDescriptor.getName();
 
-        String driver = getProperty(JDBC_DRIVER_PROPERTY, suffix);
-        String url = getProperty(JDBC_URL_PROPERTY, suffix);
-        String username = getProperty(JDBC_USERNAME_PROPERTY, suffix);
-        String password = getProperty(JDBC_PASSWORD_PROPERTY, suffix);
-        int minConnections = getIntProperty(JDBC_MIN_CONNECTIONS_PROPERTY, suffix, 1);
-        int maxConnections = getIntProperty(JDBC_MAX_CONNECTIONS_PROPERTY, suffix, 1);
+        String driver = getProperty(Constants.JDBC_DRIVER_PROPERTY, suffix);
+        String url = getProperty(Constants.JDBC_URL_PROPERTY, suffix);
+        String username = getProperty(Constants.JDBC_USERNAME_PROPERTY, suffix);
+        String password = getProperty(Constants.JDBC_PASSWORD_PROPERTY, suffix);
+        int minConnections = getIntProperty(
+                Constants.JDBC_MIN_CONNECTIONS_PROPERTY,
+                suffix,
+                1);
+        int maxConnections = getIntProperty(
+                Constants.JDBC_MAX_CONNECTIONS_PROPERTY,
+                suffix,
+                1);
 
         try {
             return new PoolManager(

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java Fri Mar  2 10:50:32 2012
@@ -50,22 +50,24 @@ import org.apache.cayenne.merge.MergerFa
  * Sample connection settings to use with DB2 are shown below:
  * 
  * <pre>
- * 
- *       test-db2.cayenne.adapter = org.apache.cayenne.dba.db2.DB2Adapter
  *       test-db2.jdbc.username = test
  *       test-db2.jdbc.password = secret
  *       test-db2.jdbc.url = jdbc:db2://servername:50000/databasename
  *       test-db2.jdbc.driver = com.ibm.db2.jcc.DB2Driver
- * 
  * </pre>
  */
 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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
         setSupportsGeneratedKeys(true);
     }
 
@@ -168,7 +170,7 @@ public class DB2Adapter extends JdbcAdap
             if (at.isMandatory()) {
                 buf.append(" NOT NULL");
             }
-            
+
             if (at.isGenerated()) {
                 buf.append(" GENERATED BY DEFAULT AS IDENTITY ");
             }
@@ -204,7 +206,9 @@ public class DB2Adapter extends JdbcAdap
      */
     @Override
     public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler) {
-        QualifierTranslator translator = new DB2QualifierTranslator(queryAssembler, "RTRIM");
+        QualifierTranslator translator = new DB2QualifierTranslator(
+                queryAssembler,
+                "RTRIM");
         translator.setCaseInsensitive(caseInsensitiveCollations);
         return translator;
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java Fri Mar  2 10:50:32 2012
@@ -17,7 +17,6 @@
  *  under the License.
  ****************************************************************/
 
-
 package org.apache.cayenne.dba.derby;
 
 import java.sql.PreparedStatement;
@@ -46,12 +45,10 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.merge.MergerFactory;
 
 /**
- * DbAdapter implementation for the <a href="http://db.apache.org/derby/"> Derby
- * RDBMS </a>. Sample connection settings to use with Derby are shown below.
- * <h3>Embedded</h3>
+ * DbAdapter implementation for the <a href="http://db.apache.org/derby/"> Derby RDBMS
+ * </a>. Sample connection settings to use with Derby are shown below. <h3>Embedded</h3>
  * 
  * <pre>
- *  test-derby.cayenne.adapter = org.apache.cayenne.dba.derby.DerbyAdapter
  *  test-derby.jdbc.url = jdbc:derby:testdb;create=true
  *  test-derby.jdbc.driver = org.apache.derby.jdbc.EmbeddedDriver
  * </pre>
@@ -59,7 +56,6 @@ import org.apache.cayenne.merge.MergerFa
  * <h3>Network Server</h3>
  * 
  * <pre>
- *  derbynet.cayenne.adapter = org.apache.cayenne.dba.derby.DerbyAdapter
  *  derbynet.jdbc.url = jdbc:derby://localhost/cayenne
  *  derbynet.jdbc.driver = org.apache.derby.jdbc.ClientDriver
  *  derbynet.jdbc.username = someuser
@@ -70,11 +66,16 @@ public class DerbyAdapter extends JdbcAd
 
     static final String FOR_BIT_DATA_SUFFIX = " FOR BIT DATA";
 
-    public DerbyAdapter(@Inject RuntimeProperties runtimeProperties,
+    public DerbyAdapter(
+            @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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
         setSupportsGeneratedKeys(true);
         setSupportsBatchUpdates(true);
     }
@@ -108,11 +109,13 @@ public class DerbyAdapter extends JdbcAd
      */
     @Override
     public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column) {
-        
+
         boolean status;
-        if ((column.getEntity().getDataMap() != null) && column.getEntity().getDataMap().isQuotingSQLIdentifiers()){ 
-            status= true;
-        } else {
+        if ((column.getEntity().getDataMap() != null)
+                && column.getEntity().getDataMap().isQuotingSQLIdentifiers()) {
+            status = true;
+        }
+        else {
             status = false;
         }
         QuotingStrategy context = getQuotingStrategy(status);
@@ -133,9 +136,7 @@ public class DerbyAdapter extends JdbcAd
         String length = "";
         if (typeSupportsLength(column.getType())) {
             int len = column.getMaxLength();
-            int scale = TypesMapping.isDecimal(column.getType())
-                    ? column.getScale()
-                    : -1;
+            int scale = TypesMapping.isDecimal(column.getType()) ? column.getScale() : -1;
 
             // sanity check
             if (scale > len) {
@@ -158,11 +159,12 @@ public class DerbyAdapter extends JdbcAd
         // middle of type name, e.g. VARCHAR (100) FOR BIT DATA.
 
         sqlBuffer.append(context.quoteString(column.getName()));
-       
+
         sqlBuffer.append(' ');
         if (length.length() > 0 && type.endsWith(FOR_BIT_DATA_SUFFIX)) {
-            sqlBuffer.append(type.substring(0, type.length()
-                    - FOR_BIT_DATA_SUFFIX.length()));
+            sqlBuffer.append(type.substring(
+                    0,
+                    type.length() - FOR_BIT_DATA_SUFFIX.length()));
             sqlBuffer.append(length);
             sqlBuffer.append(FOR_BIT_DATA_SUFFIX);
         }
@@ -178,7 +180,7 @@ public class DerbyAdapter extends JdbcAd
             sqlBuffer.append(" GENERATED BY DEFAULT AS IDENTITY");
         }
     }
-    
+
     private boolean typeSupportsLength(int type) {
         // "BLOB" and "CLOB" type support length. default length is 1M.
         switch (type) {
@@ -195,26 +197,27 @@ public class DerbyAdapter extends JdbcAd
      */
     @Override
     public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler) {
-        QualifierTranslator translator = new DerbyQualifierTranslator(queryAssembler, "RTRIM");
+        QualifierTranslator translator = new DerbyQualifierTranslator(
+                queryAssembler,
+                "RTRIM");
         translator.setCaseInsensitive(caseInsensitiveCollations);
         return translator;
     }
-    
+
     @Override
     public MergerFactory mergerFactory() {
         return new DerbyMergerFactory();
     }
-    
+
     @Override
     public void bindParameter(
-        PreparedStatement statement,
-        Object object,
-        int pos,
-        int sqlType,
-        int precision)
-        throws SQLException, Exception {
+            PreparedStatement statement,
+            Object object,
+            int pos,
+            int sqlType,
+            int precision) throws SQLException, Exception {
 
-        if (object == null && sqlType==0) {
+        if (object == null && sqlType == 0) {
             statement.setNull(pos, Types.VARCHAR);
         }
         else {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java Fri Mar  2 10:50:32 2012
@@ -47,7 +47,6 @@ import org.apache.cayenne.query.SQLActio
  * Sample connection settings to use with FrontBase are shown below:
  * 
  * <pre>
- *          fb.cayenne.adapter = org.apache.cayenne.dba.frontbase.FrontBaseAdapter
  *          fb.jdbc.username = _system
  *          fb.jdbc.password = secret
  *          fb.jdbc.url = jdbc:FrontBase://localhost/cayenne/
@@ -64,11 +63,16 @@ import org.apache.cayenne.query.SQLActio
 // what to do about it.
 public class FrontBaseAdapter extends JdbcAdapter {
 
-    public FrontBaseAdapter(@Inject RuntimeProperties runtimeProperties,
+    public FrontBaseAdapter(
+            @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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
         setSupportsBatchUpdates(true);
     }
 
@@ -101,9 +105,10 @@ public class FrontBaseAdapter extends Jd
     @Override
     public String createTable(DbEntity ent) {
         boolean status;
-        if(ent.getDataMap()!=null && ent.getDataMap().isQuotingSQLIdentifiers()){ 
-            status= true;
-        } else {
+        if (ent.getDataMap() != null && ent.getDataMap().isQuotingSQLIdentifiers()) {
+            status = true;
+        }
+        else {
             status = false;
         }
         QuotingStrategy context = getQuotingStrategy(status);
@@ -217,14 +222,15 @@ public class FrontBaseAdapter extends Jd
     @Override
     public Collection<String> dropTableStatements(DbEntity table) {
         boolean status;
-        if(table.getDataMap()!=null && table.getDataMap().isQuotingSQLIdentifiers()){ 
-            status= true;
-        } else {
+        if (table.getDataMap() != null && table.getDataMap().isQuotingSQLIdentifiers()) {
+            status = true;
+        }
+        else {
             status = false;
         }
         QuotingStrategy context = getQuotingStrategy(status);
         StringBuffer buf = new StringBuffer("DROP TABLE ");
-        buf.append(context.quoteFullyQualifiedName(table));            
+        buf.append(context.quoteFullyQualifiedName(table));
 
         buf.append(" CASCADE");
         return Collections.singleton(buf.toString());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java Fri Mar  2 10:50:32 2012
@@ -46,7 +46,6 @@ import org.apache.cayenne.query.SQLActio
  * </a>. Sample connection settings to use with HSQLDB are shown below:
  * 
  * <pre>
- *        test-hsqldb.cayenne.adapter = org.apache.cayenne.dba.hsqldb.HSQLDBAdapter
  *        test-hsqldb.jdbc.username = test
  *        test-hsqldb.jdbc.password = secret
  *        test-hsqldb.jdbc.url = jdbc:hsqldb:hsql://serverhostname
@@ -54,12 +53,17 @@ import org.apache.cayenne.query.SQLActio
  * </pre>
  */
 public class HSQLDBAdapter extends JdbcAdapter {
-    
-    public HSQLDBAdapter(@Inject RuntimeProperties runtimeProperties,
+
+    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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java Fri Mar  2 10:50:32 2012
@@ -46,11 +46,11 @@ import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
 
 /**
- * DbAdapter implementation for <a href="http://opensource.ca.com/projects/ingres/">Ingres</a>.
- * Sample connection settings to use with Ingres are shown below:
+ * DbAdapter implementation for <a
+ * href="http://opensource.ca.com/projects/ingres/">Ingres</a>. Sample connection settings
+ * to use with Ingres are shown below:
  * 
  * <pre>
- *  ingres.cayenne.adapter = org.apache.cayenne.dba.ingres.IngresAdapter
  *  ingres.jdbc.username = test
  *  ingres.jdbc.password = secret
  *  ingres.jdbc.url = jdbc:ingres://serverhostname:II7/cayenne
@@ -58,35 +58,41 @@ import org.apache.cayenne.query.SQLActio
  * </pre>
  */
 public class IngresAdapter extends JdbcAdapter {
+
     public static final String TRIM_FUNCTION = "TRIM";
-    
-    public IngresAdapter(@Inject RuntimeProperties runtimeProperties,
+
+    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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
         setSupportsUniqueConstraints(true);
         setSupportsGeneratedKeys(true);
-    }  
-  
+    }
+
     @Override
     public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler) {
         return new TrimmingQualifierTranslator(
                 queryAssembler,
                 IngresAdapter.TRIM_FUNCTION);
     }
-    
+
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query
-                .createSQLAction(new IngresActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new IngresActionBuilder(this, node
+                .getEntityResolver()));
     }
-    
+
     @Override
     protected void configureExtendedTypes(ExtendedTypeMap map) {
         super.configureExtendedTypes(map);
         map.registerType(new IngresCharType());
-        
+
         // configure boolean type to work with numeric columns
         map.registerType(new IngresBooleanType());
     }
@@ -109,19 +115,21 @@ public class IngresAdapter extends JdbcA
 
         if (object == null && (sqlType == Types.BOOLEAN || sqlType == Types.BIT)) {
             statement.setNull(pos, Types.VARCHAR);
-        } else {
+        }
+        else {
             super.bindParameter(statement, object, pos, sqlType, scale);
         }
     }
-    
+
     @Override
     public MergerFactory mergerFactory() {
         return new IngresMergerFactory();
     }
-    
+
     @Override
     public void createTableAppendColumn(StringBuffer buf, DbAttribute at) {
-        boolean status = (at.getEntity().getDataMap() != null) && at.getEntity().getDataMap().isQuotingSQLIdentifiers();
+        boolean status = (at.getEntity().getDataMap() != null)
+                && at.getEntity().getDataMap().isQuotingSQLIdentifiers();
         QuotingStrategy context = getQuotingStrategy(status);
         String[] types = externalTypesForJdbcType(at.getType());
         if (types == null || types.length == 0) {
@@ -156,8 +164,7 @@ public class IngresAdapter extends JdbcA
                 buf.append(')');
             }
         }
-        
-        
+
         if (at.isGenerated()) {
             buf.append(" GENERATED BY DEFAULT AS IDENTITY ");
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseAdapter.java Fri Mar  2 10:50:32 2012
@@ -55,7 +55,6 @@ import org.apache.cayenne.query.SQLActio
  * connection settings to use with OpenBase are shown below:
  * 
  * <pre>
- * openbase.cayenne.adapter = org.apache.cayenne.dba.openbase.OpenBaseAdapter
  * openbase.jdbc.username = test
  * openbase.jdbc.password = secret
  * openbase.jdbc.url = jdbc:openbase://serverhostname/cayenne
@@ -66,12 +65,17 @@ import org.apache.cayenne.query.SQLActio
  */
 public class OpenBaseAdapter extends JdbcAdapter {
 
-    public OpenBaseAdapter(@Inject RuntimeProperties runtimeProperties,
+    public OpenBaseAdapter(
+            @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);
-        
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
+
         // init defaults
         this.setSupportsUniqueConstraints(false);
     }
@@ -83,8 +87,8 @@ public class OpenBaseAdapter extends Jdb
      */
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query
-                .createSQLAction(new OpenBaseActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new OpenBaseActionBuilder(this, node
+                .getEntityResolver()));
     }
 
     @Override

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java Fri Mar  2 10:50:32 2012
@@ -59,7 +59,6 @@ import org.apache.cayenne.query.UpdateBa
  * connection settings to use with Oracle are shown below:
  * 
  * <pre>
- *          test-oracle.cayenne.adapter = org.apache.cayenne.dba.oracle.OracleAdapter
  *          test-oracle.jdbc.username = test
  *          test-oracle.jdbc.password = secret
  *          test-oracle.jdbc.url = jdbc:oracle:thin:@//192.168.0.20:1521/ora1 
@@ -155,12 +154,17 @@ public class OracleAdapter extends JdbcA
         return oracleCursorType;
     }
 
-    public OracleAdapter(@Inject RuntimeProperties runtimeProperties,
+    public OracleAdapter(
+            @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);
-        
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
+
         // enable batch updates by default
         setSupportsBatchUpdates(true);
     }
@@ -308,8 +312,8 @@ public class OracleAdapter extends JdbcA
      */
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query
-                .createSQLAction(new OracleActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new OracleActionBuilder(this, node
+                .getEntityResolver()));
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java Fri Mar  2 10:50:32 2012
@@ -51,23 +51,24 @@ import org.apache.cayenne.query.SQLActio
  * Sample connection settings to use with PostgreSQL are shown below:
  * 
  * <pre>
- *    
- *      postgres.cayenne.adapter = org.apache.cayenne.dba.postgres.PostgresAdapter
  *      postgres.jdbc.username = test
  *      postgres.jdbc.password = secret
  *      postgres.jdbc.url = jdbc:postgresql://serverhostname/cayenne
  *      postgres.jdbc.driver = org.postgresql.Driver
- *     
  * </pre>
- * 
  */
 public class PostgresAdapter extends JdbcAdapter {
 
-    public PostgresAdapter(@Inject RuntimeProperties runtimeProperties,
+    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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
         setSupportsBatchUpdates(true);
     }
 
@@ -78,8 +79,8 @@ public class PostgresAdapter extends Jdb
      */
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query
-                .createSQLAction(new PostgresActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new PostgresActionBuilder(this, node
+                .getEntityResolver()));
     }
 
     /**
@@ -132,17 +133,18 @@ public class PostgresAdapter extends Jdb
     @Override
     public String createTable(DbEntity ent) {
         boolean status;
-        if(ent.getDataMap()!=null && ent.getDataMap().isQuotingSQLIdentifiers()){ 
-            status= true;
-        } else {
+        if (ent.getDataMap() != null && ent.getDataMap().isQuotingSQLIdentifiers()) {
+            status = true;
+        }
+        else {
             status = false;
         }
-        QuotingStrategy context =  getQuotingStrategy(status);
+        QuotingStrategy context = getQuotingStrategy(status);
         StringBuilder buf = new StringBuilder();
         buf.append("CREATE TABLE ");
-        
-        buf.append(context.quoteFullyQualifiedName(ent)); 
-      
+
+        buf.append(context.quoteFullyQualifiedName(ent));
+
         buf.append(" (");
 
         // columns
@@ -181,9 +183,14 @@ public class PostgresAdapter extends Jdb
             // append size and precision (if applicable)
             if (typeSupportsLength(at.getType())) {
                 int len = at.getMaxLength();
-                int scale = (TypesMapping.isDecimal(at.getType()) 
-                        && at.getType() != Types.FLOAT) // Postgress don't support notations float(a, b) 
-                        ? at.getScale() : -1;
+                int scale = (TypesMapping.isDecimal(at.getType()) && at.getType() != Types.FLOAT) // Postgress
+                                                                                                  // don't
+                                                                                                  // support
+                                                                                                  // notations
+                                                                                                  // float(a,
+                                                                                                  // b)
+                        ? at.getScale()
+                        : -1;
 
                 // sanity check
                 if (scale > len) {
@@ -253,9 +260,11 @@ public class PostgresAdapter extends Jdb
      */
     @Override
     public Collection<String> dropTableStatements(DbEntity table) {
-        QuotingStrategy context = getQuotingStrategy(table.getDataMap().isQuotingSQLIdentifiers());
+        QuotingStrategy context = getQuotingStrategy(table
+                .getDataMap()
+                .isQuotingSQLIdentifiers());
         StringBuffer buf = new StringBuffer("DROP TABLE ");
-        buf.append(context.quoteFullyQualifiedName(table));            
+        buf.append(context.quoteFullyQualifiedName(table));
         buf.append(" CASCADE");
         return Collections.singleton(buf.toString());
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java Fri Mar  2 10:50:32 2012
@@ -39,12 +39,10 @@ import org.apache.cayenne.query.SQLActio
 
 /**
  * A SQLite database adapter that works with Zentus JDBC driver. See
- * http://www.zentus.com/sqlitejdbc/ for the driver information.
- *
- * Also look at http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC for another adaptor option.
+ * http://www.zentus.com/sqlitejdbc/ for the driver information. Also look at
+ * http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC for another adaptor option.
  * 
  * <pre>
- *      sqlite.cayenne.adapter = org.apache.cayenne.dba.sqlite.SQLiteAdapter
  *      sqlite.jdbc.url = jdbc:sqlite:sqlitetest.db
  *      sqlite.jdbc.driver = org.sqlite.JDBC
  * </pre>
@@ -54,11 +52,16 @@ import org.apache.cayenne.query.SQLActio
 // check http://cwiki.apache.org/CAY/sqliteadapter.html for current limitations.
 public class SQLiteAdapter extends JdbcAdapter {
 
-    public SQLiteAdapter(@Inject RuntimeProperties runtimeProperties,
+    public SQLiteAdapter(
+            @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);
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
         this.setSupportsUniqueConstraints(false);
         this.setSupportsGeneratedKeys(true);
     }
@@ -89,8 +92,8 @@ public class SQLiteAdapter extends JdbcA
 
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query
-                .createSQLAction(new SQLiteActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new SQLiteActionBuilder(this, node
+                .getEntityResolver()));
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java Fri Mar  2 10:50:32 2012
@@ -36,21 +36,17 @@ import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLAction;
 
 /**
- * Cayenne DbAdapter implementation for <a
- * href="http://www.microsoft.com/sql/"Microsoft SQL Server </a> engine.
- * </p>
- * <h3>Microsoft Driver Settings</h3>
+ * Cayenne DbAdapter implementation for <a href="http://www.microsoft.com/sql/"Microsoft
+ * SQL Server </a> engine. </p> <h3>Microsoft Driver Settings</h3>
  * <p>
  * Sample connection settings to use with MS SQL Server are shown below:
  * 
  * <pre>
- *       sqlserver.cayenne.adapter = org.apache.cayenne.dba.sqlserver.SQLServerAdapter
  *       sqlserver.jdbc.username = test
  *       sqlserver.jdbc.password = secret
  *       sqlserver.jdbc.url = jdbc:sqlserver://192.168.0.65;databaseName=cayenne;SelectMethod=cursor
  *       sqlserver.jdbc.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
  * </pre>
- * 
  * <p>
  * <i>Note on case-sensitive LIKE: if your application requires case-sensitive LIKE
  * support, ask your DBA to configure the database to use a case-senstitive collation (one
@@ -65,17 +61,10 @@ import org.apache.cayenne.query.SQLActio
  * </p>
  * 
  * <pre>
- * 
- *  
- *   
- *       sqlserver.cayenne.adapter = org.apache.cayenne.dba.sqlserver.SQLServerAdapter
  *       sqlserver.jdbc.username = test
  *       sqlserver.jdbc.password = secret
  *       sqlserver.jdbc.url = jdbc:jtds:sqlserver://192.168.0.65/cayenne
  *       sqlserver.jdbc.driver = net.sourceforge.jtds.jdbc.Driver
- *    
- *   
- *  
  * </pre>
  * 
  * @since 1.1
@@ -84,18 +73,22 @@ public class SQLServerAdapter extends Sy
 
     public static final String TRIM_FUNCTION = "RTRIM";
 
-    public SQLServerAdapter(@Inject RuntimeProperties runtimeProperties,
+    public SQLServerAdapter(
+            @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);
-        
-        // TODO: i wonder if Sybase supports generated keys... 
+        super(
+                runtimeProperties,
+                defaultExtendedTypes,
+                userExtendedTypes,
+                extendedTypeFactories);
+
+        // TODO: i wonder if Sybase supports generated keys...
         // in this case we need to move this to the super.
         this.setSupportsGeneratedKeys(true);
         this.setSupportsBatchUpdates(true);
     }
-    
 
     /**
      * Uses SQLServerActionBuilder to create the right action.
@@ -104,11 +97,10 @@ public class SQLServerAdapter extends Sy
      */
     @Override
     public SQLAction getAction(Query query, DataNode node) {
-        return query
-                .createSQLAction(new SQLServerActionBuilder(this, node.getEntityResolver()));
+        return query.createSQLAction(new SQLServerActionBuilder(this, node
+                .getEntityResolver()));
     }
 
-    
     /**
      * Returns a trimming translator.
      */
@@ -121,7 +113,6 @@ public class SQLServerAdapter extends Sy
         return translator;
     }
 
-    
     /**
      * Overrides super implementation to correctly set up identity columns.
      * 
@@ -129,19 +120,18 @@ public class SQLServerAdapter extends Sy
      */
     @Override
     public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column) {
-       
+
         super.createTableAppendColumn(sqlBuffer, column);
-        
-        if(column.isGenerated()) {
+
+        if (column.isGenerated()) {
             // current limitation - we don't allow to set identity parameters...
             sqlBuffer.append(" IDENTITY (1, 1)");
         }
     }
-    
+
     @Override
     public MergerFactory mergerFactory() {
         return new SQLServerMergerFactory();
     }
-    
-    
+
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsTest.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsTest.java Fri Mar  2 10:50:32 2012
@@ -19,7 +19,7 @@
 
 package org.apache.cayenne;
 
-import org.apache.cayenne.configuration.rop.client.ClientModule;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.rop.client.ClientRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.ObjectIdQuery;
@@ -38,7 +38,7 @@ import org.apache.cayenne.unit.di.server
  */
 @UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
 @ClientRuntimeProperty({
-        ClientModule.CHANNEL_EVENTS, "true"
+        Constants.ROP_CHANNEL_EVENTS_PROPERTY, "true"
 })
 public class CayenneContextClientChannelEventsTest extends ClientCase {
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/rop/client/ClientModuleTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/rop/client/ClientModuleTest.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/rop/client/ClientModuleTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/rop/client/ClientModuleTest.java Fri Mar  2 10:50:32 2012
@@ -24,6 +24,7 @@ import java.util.Map;
 import junit.framework.TestCase;
 
 import org.apache.cayenne.DataChannel;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.ObjectContextFactory;
 import org.apache.cayenne.di.Binder;
 import org.apache.cayenne.di.DIBootstrap;
@@ -39,7 +40,7 @@ public class ClientModuleTest extends Te
     public void testClientConnection() {
 
         Map<String, String> properties = new HashMap<String, String>();
-        properties.put(ClientModule.ROP_SERVICE_URL, "http://localhost/YuM");
+        properties.put(Constants.ROP_SERVICE_URL_PROPERTY, "http://localhost/YuM");
         ClientModule module = new ClientModule(properties);
 
         Injector injector = DIBootstrap.createInjector(module);
@@ -105,7 +106,7 @@ public class ClientModuleTest extends Te
     public void testDataChannel_NoChannelEvents() {
 
         Map<String, String> properties = new HashMap<String, String>();
-        properties.put(ClientModule.CHANNEL_EVENTS, "true");
+        properties.put(Constants.ROP_CHANNEL_EVENTS_PROPERTY, "true");
         ClientModule module = new ClientModule(properties) {
 
             @Override

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/server/DefaultDataSourceFactoryLoaderTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/server/DefaultDataSourceFactoryLoaderTest.java?rev=1296128&r1=1296127&r2=1296128&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/server/DefaultDataSourceFactoryLoaderTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/configuration/server/DefaultDataSourceFactoryLoaderTest.java Fri Mar  2 10:50:32 2012
@@ -22,6 +22,7 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 import junit.framework.TestCase;
 
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.DataChannelDescriptor;
 import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.configuration.RuntimeProperties;
@@ -101,9 +102,9 @@ public class DefaultDataSourceFactoryLoa
     public void testGetDataSourceFactory_Property() throws Exception {
 
         final RuntimeProperties properties = mock(RuntimeProperties.class);
-        when(properties.get(PropertyDataSourceFactory.JDBC_DRIVER_PROPERTY)).thenReturn(
+        when(properties.get(Constants.JDBC_DRIVER_PROPERTY)).thenReturn(
                 "x");
-        when(properties.get(PropertyDataSourceFactory.JDBC_URL_PROPERTY)).thenReturn("y");
+        when(properties.get(Constants.JDBC_URL_PROPERTY)).thenReturn("y");
 
         DataChannelDescriptor channelDescriptor = new DataChannelDescriptor();
         channelDescriptor.setName("X");
@@ -131,19 +132,19 @@ public class DefaultDataSourceFactoryLoa
         assertNotNull(factory);
         assertTrue(factory instanceof PropertyDataSourceFactory);
 
-        when(properties.get(PropertyDataSourceFactory.JDBC_URL_PROPERTY))
+        when(properties.get(Constants.JDBC_URL_PROPERTY))
                 .thenReturn(null);
         factory = factoryLoader.getDataSourceFactory(nodeDescriptor);
         assertNotNull(factory);
         assertFalse(factory instanceof PropertyDataSourceFactory);
 
-        when(properties.get(PropertyDataSourceFactory.JDBC_URL_PROPERTY + ".X.node2"))
+        when(properties.get(Constants.JDBC_URL_PROPERTY + ".X.node2"))
                 .thenReturn("y");
         factory = factoryLoader.getDataSourceFactory(nodeDescriptor);
         assertNotNull(factory);
         assertFalse(factory instanceof PropertyDataSourceFactory);
 
-        when(properties.get(PropertyDataSourceFactory.JDBC_URL_PROPERTY + ".X.node1"))
+        when(properties.get(Constants.JDBC_URL_PROPERTY + ".X.node1"))
                 .thenReturn("y");
         factory = factoryLoader.getDataSourceFactory(nodeDescriptor);
         assertNotNull(factory);



Mime
View raw message