cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r940358 - in /cayenne/main/trunk: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ framework/cayenne-jdk1....
Date Mon, 03 May 2010 03:37:00 GMT
Author: aadamchik
Date: Mon May  3 03:36:59 2010
New Revision: 940358

URL: http://svn.apache.org/viewvc?rev=940358&view=rev
Log:
CAY-1414 Remove org.apache.cayenne.conf package

* Removed DefaultConfiguration
* Removed Configuration
* Removed util.WebApplicationResourceLocator (this one seems to be unused since the server
filters were migrated to DI)
* removed everything else from o.a.c.conf with a few things left as deprecated
* switched (almost all) tutorials to DI

Added:
    cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/cayenne-UntitledDomain.xml
    cayenne/main/trunk/tutorials/tutorial/src/main/resources/cayenne-UntitledDomain.xml
Removed:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/AbstractHandler.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ClasspathResourceFinder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ConfigLoader.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ConfigLoaderDelegate.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ConfigSaverDelegate.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ConfigStatus.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/Configuration.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/DataSourceFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/DefaultConfiguration.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/NodeDataSource.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/RuntimeLoadDelegate.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/RuntimeSaveDelegate.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/WebApplicationResourceLocator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/AbstractAccessStack.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/util/WebApplicationResourceLocatorAccess.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/util/WebApplicationResourceLocatorTest.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/action/MockConfiguration.java
    cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/UntitledDomainNode.driver.xml
    cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/cayenne.xml
    cayenne/main/trunk/tutorials/tutorial/src/main/resources/UntitledDomainNode.driver.xml
    cayenne/main/trunk/tutorials/tutorial/src/main/resources/cayenne.xml
Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ResourceFinder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/resource/ClassLoaderResourceLocator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SimpleAccessStack.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDataMapAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/ApplicationFileFilterTest.java
    cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/DataMapFileFilterTest.java
    cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
    cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/UntitledDomainMap.map.xml
    cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
    cayenne/main/trunk/tutorials/tutorial/src/main/resources/UntitledDomainMap.map.xml
    cayenne/main/trunk/tutorials/tutorial/src/main/webapp/WEB-INF/web.xml

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Mon May  3 03:36:59 2010
@@ -33,6 +33,7 @@ CAY-1350 Implement memorized sorting of 
 CAY-1374 Add parent dataMap property to Query interface
 CAY-1393 Update velocity to 1.6.3
 CAY-1394 DI-based replacement for JNDI hack
+CAY-1414 Remove org.apache.cayenne.conf package
 CAY-1415 Replace WebApplicationContextFilter with a DI-enabled filter
 CAY-1419 File-based ResourceLocator to replace legacy FileConfiguration
 CAY-1420 Migrate ROP server-side components to DI-based stack

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
Mon May  3 03:36:59 2010
@@ -208,7 +208,7 @@ public class DataNode implements QueryEn
     }
 
     /**
-     * Returns a DataNode that should hanlde queries for all DataMap components.
+     * Returns a DataNode that should handle queries for all DataMap components.
      * 
      * @since 1.1
      */

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ResourceFinder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ResourceFinder.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ResourceFinder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conf/ResourceFinder.java
Mon May  3 03:36:59 2010
@@ -25,7 +25,10 @@ import java.util.Collection;
  * An object that defines a strategy for locating stream resources.
  * 
  * @since 3.0
+ * @deprecated since 3.1 deprecated in favor of injectable
+ *             org.apache.cayenne.resource.ResourceLocator.
  */
+@Deprecated
 public interface ResourceFinder {
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
Mon May  3 03:36:59 2010
@@ -35,7 +35,6 @@ import org.apache.cayenne.access.trans.Q
 import org.apache.cayenne.access.trans.QueryAssembler;
 import org.apache.cayenne.access.types.ExtendedType;
 import org.apache.cayenne.access.types.ExtendedTypeMap;
-import org.apache.cayenne.conf.ClasspathResourceFinder;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbJoin;
@@ -43,6 +42,9 @@ 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;
 
 /**
@@ -65,6 +67,8 @@ public class JdbcAdapter implements DbAd
     protected String identifiersStartQuote;
     protected String identifiersEndQuote;
 
+    protected ResourceLocator resourceLocator;
+
     /**
      * @since 3.0
      */
@@ -87,6 +91,9 @@ public class JdbcAdapter implements DbAd
         this.setSupportsBatchUpdates(false);
         this.setSupportsUniqueConstraints(true);
 
+        // TODO: andrus 05.02.2010 - ideally this should be injected
+        this.resourceLocator = new ClassLoaderResourceLocator();
+
         this.pkGenerator = createPkGenerator();
         this.typesHandler = TypesHandler.getHandler(findResource("/types.xml"));
         this.extendedTypes = new ExtendedTypeMap();
@@ -122,9 +129,10 @@ public class JdbcAdapter implements DbAd
         while (adapterClass != null && JdbcAdapter.class.isAssignableFrom(adapterClass))
{
 
             String path = Util.getPackagePath(adapterClass.getName()) + name;
-            URL url = new ClasspathResourceFinder().getResource(path);
-            if (url != null) {
-                return url;
+            Collection<Resource> resources = resourceLocator.findResources(path);
+
+            if (!resources.isEmpty()) {
+                return resources.iterator().next().getURL();
             }
 
             adapterClass = adapterClass.getSuperclass();
@@ -322,12 +330,11 @@ public class JdbcAdapter implements DbAd
         // append size and precision (if applicable)s
         if (TypesMapping.supportsLength(column.getType())) {
             int len = column.getMaxLength();
-            
-            int scale = (TypesMapping.isDecimal(column.getType()) 
-                    && column.getType() != Types.FLOAT
-                    ) 
-                    ? column.getScale() : -1;
-            
+
+            int scale = (TypesMapping.isDecimal(column.getType()) && column.getType()
!= Types.FLOAT)
+                    ? column.getScale()
+                    : -1;
+
             // sanity check
             if (scale > len) {
                 scale = -1;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java
Mon May  3 03:36:59 2010
@@ -765,7 +765,9 @@ public class MapLoader extends DefaultHa
      * Loads DataMap from file specified by <code>uri</code> parameter.
      * 
      * @throws CayenneRuntimeException if source URI does not resolve to a valid map files
+     * @deprecated since 3.1 {@link #loadDataMap(InputSource)} should be used.
      */
+    @Deprecated
     public DataMap loadDataMap(String uri) throws CayenneRuntimeException {
         // configure resource locator
         ResourceFinder locator = createResourceFinder();
@@ -825,7 +827,10 @@ public class MapLoader extends DefaultHa
      * Creates, configures and returns a default ResourceFinder.
      * 
      * @since 3.0
+     * @deprecated since 3.1 as MapLoader should not bother itself with looking up
+     *             resources.
      */
+    @Deprecated
     protected ResourceFinder createResourceFinder() {
         ResourceLocator locator = new ResourceLocator();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/resource/ClassLoaderResourceLocator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/resource/ClassLoaderResourceLocator.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/resource/ClassLoaderResourceLocator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/resource/ClassLoaderResourceLocator.java
Mon May  3 03:36:59 2010
@@ -58,6 +58,21 @@ public class ClassLoaderResourceLocator 
     }
 
     protected ClassLoader getClassLoader() {
-        return Thread.currentThread().getContextClassLoader();
+        ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+        if (loader == null) {
+            loader = getClass().getClassLoader();
+        }
+
+        if (loader == null) {
+            loader = ClassLoader.getSystemClassLoader();
+        }
+
+        if (loader == null) {
+            throw new IllegalStateException(
+                    "Can't detect ClassLoader to use for resouyrce location");
+        }
+
+        return loader;
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java
Mon May  3 03:36:59 2010
@@ -35,7 +35,11 @@ import org.apache.commons.logging.LogFac
 
 /**
  * Utility class to find resources (files, etc.), using a preconfigured strategy.
+ * 
+ * @deprecated since 3.1 deprecated in favor of injectable
+ *             org.apache.cayenne.resource.ResourceLocator.
  */
+@Deprecated
 public class ResourceLocator implements ResourceFinder {
 
     private static Log logObj = LogFactory.getLog(ResourceLocator.class);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SimpleAccessStack.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SimpleAccessStack.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SimpleAccessStack.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SimpleAccessStack.java
Mon May  3 03:36:59 2010
@@ -19,23 +19,54 @@
 
 package org.apache.cayenne.unit;
 
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
 import java.util.Map;
 
 import org.apache.art.StringET1ExtendedType;
+import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.access.DbGenerator;
+import org.apache.cayenne.access.QueryLogger;
 import org.apache.cayenne.access.UnitTestDomain;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
+import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.event.DefaultEventManager;
 import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.map.DbAttribute;
+import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.Procedure;
 import org.apache.cayenne.query.Query;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Default implementation of the AccessStack that has a single DataNode per DataMap.
  */
-public class SimpleAccessStack extends AbstractAccessStack implements AccessStack {
+public class SimpleAccessStack implements AccessStack {
 
+    private static Log logger = LogFactory.getLog(SimpleAccessStack.class);
+
+    // hardcoded dependent entities that should be excluded
+    // if LOBs are not supported
+    private static final String[] EXTRA_EXCLUDED_FOR_NO_LOB = new String[] {
+        "CLOB_DETAIL"
+    };
+
+    protected CayenneResources resources;
     protected UnitTestDomain domain;
     protected DataSetFactory dataSetFactory;
 
@@ -51,7 +82,10 @@ public class SimpleAccessStack extends A
         }
     }
 
-    @Override
+    public AccessStackAdapter getAdapter(DataNode node) {
+        return resources.getAccessStackAdapter(node.getAdapter().getClass());
+    }
+
     protected DataDomain getDomain() {
         return domain;
     }
@@ -137,4 +171,243 @@ public class SimpleAccessStack extends A
             createPKSupport(node, node.getDataMaps().iterator().next());
         }
     }
+
+    /**
+     * Helper method that orders DbEntities to satisfy referential constraints and returns
+     * an ordered list.
+     */
+    protected List dbEntitiesInInsertOrder(DataNode node, DataMap map) {
+        List entities = new ArrayList(map.getDbEntities());
+
+        // filter varios unsupported tests...
+
+        // LOBs
+        boolean excludeLOB = !getAdapter(node).supportsLobs();
+        boolean excludeBinPK = !getAdapter(node).supportsBinaryPK();
+        if (excludeLOB || excludeBinPK) {
+            Iterator it = entities.iterator();
+            List filtered = new ArrayList();
+            while (it.hasNext()) {
+                DbEntity ent = (DbEntity) it.next();
+
+                // check for LOB attributes
+                if (excludeLOB) {
+                    if (Arrays.binarySearch(EXTRA_EXCLUDED_FOR_NO_LOB, ent.getName()) >=
0) {
+                        continue;
+                    }
+
+                    boolean hasLob = false;
+                    for (final DbAttribute attr : ent.getAttributes()) {
+                        if (attr.getType() == Types.BLOB || attr.getType() == Types.CLOB)
{
+                            hasLob = true;
+                            break;
+                        }
+                    }
+
+                    if (hasLob) {
+                        continue;
+                    }
+                }
+
+                // check for BIN PK
+                if (excludeBinPK) {
+                    boolean skip = false;
+                    for (final DbAttribute attr : ent.getAttributes()) {
+                        // check for BIN PK or FK to BIN Pk
+                        if (attr.getType() == Types.BINARY
+                                || attr.getType() == Types.VARBINARY
+                                || attr.getType() == Types.LONGVARBINARY) {
+
+                            if (attr.isPrimaryKey() || attr.isForeignKey()) {
+                                skip = true;
+                                break;
+                            }
+                        }
+                    }
+
+                    if (skip) {
+                        continue;
+                    }
+                }
+
+                filtered.add(ent);
+            }
+
+            entities = filtered;
+        }
+
+        node.getEntitySorter().sortDbEntities(entities, false);
+        return entities;
+    }
+
+    protected void deleteTestData(DataNode node, DataMap map) throws Exception {
+
+        Connection conn = node.getDataSource().getConnection();
+        List list = this.dbEntitiesInInsertOrder(node, map);
+        try {
+            if (conn.getAutoCommit()) {
+                conn.setAutoCommit(false);
+            }
+
+            Statement stmt = conn.createStatement();
+
+            ListIterator it = list.listIterator(list.size());
+            while (it.hasPrevious()) {
+                DbEntity ent = (DbEntity) it.previous();
+
+                boolean status;
+                if (ent.getDataMap() != null
+                        && ent.getDataMap().isQuotingSQLIdentifiers()) {
+                    status = true;
+                }
+                else {
+                    status = false;
+                }
+
+                QuotingStrategy strategy = getAdapter(node).getQuotingStrategy(status);
+
+                String deleteSql = "DELETE FROM " + strategy.quoteString(ent.getName());
+
+                try {
+                    stmt.executeUpdate(deleteSql);
+                }
+                catch (SQLException e) {
+                    try {
+                        Collection<String> deleteTableSql = node
+                                .getAdapter()
+                                .dropTableStatements(ent);
+                        stmt.executeUpdate(deleteTableSql.iterator().next());
+                        String createTableSql = node.getAdapter().createTable(ent);
+                        stmt.executeUpdate(createTableSql);
+                    }
+                    catch (SQLException e1) {
+                        throw new CayenneRuntimeException(
+                                "Error deleting test data for entity '"
+                                        + ent.getName()
+                                        + "': "
+                                        + e.getLocalizedMessage());
+                    }
+                }
+            }
+            conn.commit();
+            stmt.close();
+        }
+        finally {
+            conn.close();
+        }
+    }
+
+    protected void dropSchema(DataNode node, DataMap map) throws Exception {
+        Connection conn = node.getDataSource().getConnection();
+        List list = dbEntitiesInInsertOrder(node, map);
+
+        try {
+            DatabaseMetaData md = conn.getMetaData();
+            ResultSet tables = md.getTables(null, null, "%", null);
+            List allTables = new ArrayList();
+
+            while (tables.next()) {
+                // 'toUpperCase' is needed since most databases
+                // are case insensitive, and some will convert names to lower case
+                // (PostgreSQL)
+                String name = tables.getString("TABLE_NAME");
+                if (name != null)
+                    allTables.add(name.toUpperCase());
+            }
+            tables.close();
+
+            getAdapter(node).willDropTables(conn, map, allTables);
+
+            // drop all tables in the map
+            Statement stmt = conn.createStatement();
+
+            ListIterator it = list.listIterator(list.size());
+            while (it.hasPrevious()) {
+                DbEntity ent = (DbEntity) it.previous();
+                if (!allTables.contains(ent.getName().toUpperCase())) {
+                    continue;
+                }
+
+                for (String dropSql : node.getAdapter().dropTableStatements(ent)) {
+                    try {
+                        logger.info(dropSql);
+                        stmt.execute(dropSql);
+                    }
+                    catch (SQLException sqe) {
+                        logger.warn(
+                                "Can't drop table " + ent.getName() + ", ignoring...",
+                                sqe);
+                    }
+                }
+            }
+
+            getAdapter(node).droppedTables(conn, map);
+        }
+        finally {
+            conn.close();
+        }
+
+    }
+
+    protected void dropPKSupport(DataNode node, DataMap map) throws Exception {
+        List filteredEntities = dbEntitiesInInsertOrder(node, map);
+        node.getAdapter().getPkGenerator().dropAutoPk(node, filteredEntities);
+    }
+
+    protected void createPKSupport(DataNode node, DataMap map) throws Exception {
+        List filteredEntities = dbEntitiesInInsertOrder(node, map);
+        node.getAdapter().getPkGenerator().createAutoPk(node, filteredEntities);
+    }
+
+    protected void createSchema(DataNode node, DataMap map) throws Exception {
+        Connection conn = node.getDataSource().getConnection();
+
+        try {
+            getAdapter(node).willCreateTables(conn, map);
+            Statement stmt = conn.createStatement();
+            Iterator it = tableCreateQueries(node, map);
+            while (it.hasNext()) {
+                String query = (String) it.next();
+                QueryLogger.logQuery(query, Collections.EMPTY_LIST);
+                stmt.execute(query);
+            }
+            getAdapter(node).createdTables(conn, map);
+        }
+        finally {
+            conn.close();
+        }
+    }
+
+    /**
+     * Returns iterator of preprocessed table create queries.
+     */
+    protected Iterator tableCreateQueries(DataNode node, DataMap map) throws Exception {
+        DbAdapter adapter = node.getAdapter();
+        DbGenerator gen = new DbGenerator(adapter, map, null, getDomain());
+
+        List orderedEnts = dbEntitiesInInsertOrder(node, map);
+        List queries = new ArrayList();
+
+        // table definitions
+        Iterator it = orderedEnts.iterator();
+        while (it.hasNext()) {
+            DbEntity ent = (DbEntity) it.next();
+            queries.add(adapter.createTable(ent));
+        }
+
+        // FK constraints
+
+        it = orderedEnts.iterator();
+        while (it.hasNext()) {
+            DbEntity ent = (DbEntity) it.next();
+            if (!getAdapter(node).supportsFKConstraints(ent)) {
+                continue;
+            }
+
+            List qs = gen.createConstraintsQueries(ent);
+            queries.addAll(qs);
+        }
+
+        return queries.iterator();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
Mon May  3 03:36:59 2010
@@ -36,8 +36,8 @@ import java.util.prefs.BackingStoreExcep
 import java.util.prefs.Preferences;
 
 import javax.swing.WindowConstants;
+import javax.swing.filechooser.FileFilter;
 
-import org.apache.cayenne.conf.Configuration;
 import org.apache.cayenne.modeler.action.ExitAction;
 import org.apache.cayenne.modeler.action.OpenProjectAction;
 import org.apache.cayenne.modeler.dialog.validator.ValidatorDialog;
@@ -45,6 +45,7 @@ import org.apache.cayenne.modeler.editor
 import org.apache.cayenne.modeler.pref.ComponentGeometry;
 import org.apache.cayenne.modeler.pref.FSPath;
 import org.apache.cayenne.modeler.util.CayenneController;
+import org.apache.cayenne.modeler.util.FileFilters;
 import org.apache.cayenne.project2.Project;
 import org.apache.cayenne.project2.validation.ProjectValidator;
 import org.apache.cayenne.validation.ValidationFailure;
@@ -128,8 +129,10 @@ public class CayenneModelerController ex
         File transferFile = (File) fileList.get(0);
 
         if (transferFile.isFile()) {
+            
+            FileFilter filter = FileFilters.getApplicationFilter();
 
-            if (Configuration.DEFAULT_DOMAIN_FILE.equals(transferFile.getName())) {
+            if (filter.accept(transferFile)) {
                 ActionEvent e = new ActionEvent(
                         transferFile,
                         ActionEvent.ACTION_PERFORMED,

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
Mon May  3 03:36:59 2010
@@ -29,11 +29,10 @@ import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 
-import org.apache.cayenne.conf.Configuration;
 import org.apache.cayenne.gen.ClassGenerationAction;
+import org.apache.cayenne.modeler.action.OpenProjectAction;
 import org.apache.cayenne.modeler.dialog.pref.GeneralPreferences;
 import org.apache.cayenne.modeler.util.CayenneUserDir;
-import org.apache.cayenne.modeler.action.OpenProjectAction;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -70,9 +69,6 @@ public class Main {
     protected static File projectFileFromArgs(String[] args) {
         if (args.length == 1) {
             File f = new File(args[0]);
-            if (f.isDirectory()) {
-                f = new File(f, Configuration.DEFAULT_DOMAIN_FILE);
-            }
 
             if (f.isFile()
                     && f.getName().startsWith("cayenne")

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDataMapAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDataMapAction.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDataMapAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/ImportDataMapAction.java
Mon May  3 03:36:59 2010
@@ -69,6 +69,7 @@ public class ImportDataMapAction extends
             // configure resource locator to take absolute path
             MapLoader mapLoader = new MapLoader() {
 
+                @Deprecated
                 protected ResourceLocator configLocator() {
                     ResourceLocator locator = new ResourceLocator();
                     locator.setSkipAbsolutePath(false);

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/ApplicationFileFilterTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/ApplicationFileFilterTest.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/ApplicationFileFilterTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/ApplicationFileFilterTest.java
Mon May  3 03:36:59 2010
@@ -25,11 +25,10 @@ import javax.swing.filechooser.FileFilte
 
 import junit.framework.TestCase;
 
-import org.apache.cayenne.conf.Configuration;
-
 /**
  */
 public class ApplicationFileFilterTest extends TestCase {
+
     protected FileFilter filter;
 
     public void setUp() throws Exception {
@@ -41,7 +40,7 @@ public class ApplicationFileFilterTest e
     }
 
     public void testAcceptCayenneXml() throws Exception {
-        assertTrue(filter.accept(new File(Configuration.DEFAULT_DOMAIN_FILE)));
+        assertTrue(filter.accept(new File("cayenne.xml")));
     }
 
     public void testRejectOther() throws Exception {

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/DataMapFileFilterTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/DataMapFileFilterTest.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/DataMapFileFilterTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/test/java/org/apache/cayenne/modeler/util/DataMapFileFilterTest.java
Mon May  3 03:36:59 2010
@@ -25,11 +25,10 @@ import javax.swing.filechooser.FileFilte
 
 import junit.framework.TestCase;
 
-import org.apache.cayenne.conf.Configuration;
-
 /**
  */
 public class DataMapFileFilterTest extends TestCase {
+
     protected FileFilter filter;
 
     public void setUp() throws Exception {
@@ -41,7 +40,7 @@ public class DataMapFileFilterTest exten
     }
 
     public void testRejectCayenneXml() throws Exception {
-        assertFalse(filter.accept(new File(Configuration.DEFAULT_DOMAIN_FILE)));
+        assertFalse(filter.accept(new File("cayenne.xml")));
     }
 
     public void testRejectOther() throws Exception {

Modified: cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
(original)
+++ cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
Mon May  3 03:36:59 2010
@@ -20,18 +20,12 @@
 package org.apache.cayenne.tools;
 
 import java.io.File;
-import java.util.List;
-import java.util.Properties;
 
-import org.apache.cayenne.conf.Configuration;
 import org.apache.cayenne.modeler.Main;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.Resource;
-import org.apache.maven.project.MavenProject;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.apache.maven.project.MavenProject;
 
 /**
  * Maven mojo to start up the Cayenne modeler from the command-line.
@@ -43,76 +37,43 @@ import org.codehaus.plexus.util.xml.Xpp3
  */
 public class CayenneModelerMojo extends AbstractMojo {
 
-    /**
-     * Name of the model file to open.  
-     *
-     * @parameter expression="${modeler.modelFile} 
-     */
-    private File modelFile;
-
-    /**
-     * Project instance.
-     * @parameter default-value="${project}"
-     * @required
-     * @readonly
-     */
-    private MavenProject project;
-
-    private File lookupModelFile() {
-        if (modelFile != null) {
-            if (modelFile.isDirectory()) {
-                return new File(modelFile,Configuration.DEFAULT_DOMAIN_FILE);
-            } else {
-                return modelFile;
-            }
-        }
-        
-        //try to locate cayenne.xml at top level of a resource directory.
-        for(Object o : project.getResources()) {
-            Resource r = (Resource) o;
-            File f = new File(r.getDirectory(),Configuration.DEFAULT_DOMAIN_FILE);
-            if (f.exists()) {
-                return f;
-            }
-        }
-        
-        //failing that, try for WEB-INF/DEFAULT_DOMAIN_FILE 
-        //but only if we're using the war plugin
-        for(Object o : project.getBuildPlugins()) {
-            Plugin plugin = (Plugin) o;
-            //means we're using the war plugin.
-            if (plugin.getKey().equals("org.apache.maven.plugins:maven-war-plugin")) {
-                //check to see if the default loc. is overridden.
-                Xpp3Dom conf = (Xpp3Dom)plugin.getConfiguration();
-                String path;
-
-                if (conf != null && (conf = conf.getChild("warSourceDirectory"))
!= null) {
-                    path = conf.getValue().trim();
-                } else {
-                   path = "src" + File.separator + "main" + File.separator + "webapp"; 
-                }
-
-                return new File(project.getBasedir().getAbsolutePath(),
-                                    path + File.separator + 
-                                    "WEB-INF" + File.separator + 
-                                    Configuration.DEFAULT_DOMAIN_FILE);
-            }
-        }
+	/**
+	 * Name of the model file to open.
+	 * 
+	 * @parameter expression="${modeler.modelFile}
+	 */
+	private File modelFile;
+
+	/**
+	 * Project instance.
+	 * 
+	 * @parameter default-value="${project}"
+	 * @required
+	 * @readonly
+	 */
+	private MavenProject project;
+
+	private File lookupModelFile() {
+		if (modelFile != null && modelFile.isFile()) {
+			return modelFile;
+		}
 
-        return null;
-    }
+		return null;
+	}
 
 	public void execute() throws MojoExecutionException, MojoFailureException {
-        //setup the system property to tell the modeler where to generate the java source
files.
-        System.setProperty("cayenne.cgen.destdir",project.getBuild().getSourceDirectory());
-
-        //start the modeler with the provided model file, if it exists.
-        File f = lookupModelFile();
-        if (f != null && f.exists() && !f.isDirectory()) {
-            Main.main(new String[] {f.getAbsolutePath()});
-        } else {
-            Main.main(new String[] {});
-        }
+		// setup the system property to tell the modeler where to generate the
+		// java source files.
+		System.setProperty("cayenne.cgen.destdir", project.getBuild()
+				.getSourceDirectory());
+
+		// start the modeler with the provided model file, if it exists.
+		File f = lookupModelFile();
+		if (f != null && f.exists() && !f.isDirectory()) {
+			Main.main(new String[] { f.getAbsolutePath() });
+		} else {
+			Main.main(new String[] {});
+		}
 
 		// Block until the modeler finishes executing.
 		try {

Modified: cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/UntitledDomainMap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/UntitledDomainMap.map.xml?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/UntitledDomainMap.map.xml
(original)
+++ cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/UntitledDomainMap.map.xml
Mon May  3 03:36:59 2010
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0.0.1">
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
 	<property name="defaultPackage" value="org.apache.cayenne.tutorial.persistent"/>
 	<property name="clientSupported" value="true"/>
 	<property name="defaultClientPackage" value="org.apache.cayenne.tutorial.persistent.client"/>

Added: cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/cayenne-UntitledDomain.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/cayenne-UntitledDomain.xml?rev=940358&view=auto
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/cayenne-UntitledDomain.xml
(added)
+++ cayenne/main/trunk/tutorials/tutorial-rop-server/src/main/resources/cayenne-UntitledDomain.xml
Mon May  3 03:36:59 2010
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="6">
+	<map name="UntitledDomainMap"/>
+
+	<node name="UntitledDomainNode"
+		 factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
+		 schema-update-strategy="org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy"
+		>
+		<map-ref name="UntitledDomainMap"/>
+		<data-source>
+			<driver value="org.apache.derby.jdbc.EmbeddedDriver"/>
+			<url value="jdbc:derby:memory:testdb;create=true"/>
+			<connectionPool min="1" max="1"/>
+			<login/>
+		</data-source>
+	</node>
+</domain>

Modified: cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
(original)
+++ cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
Mon May  3 03:36:59 2010
@@ -25,7 +25,7 @@ import java.util.List;
 
 import org.apache.cayenne.Cayenne;
 import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.access.DataContext;
+import org.apache.cayenne.configuration.server.CayenneServerRuntime;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.query.SelectQuery;
@@ -37,8 +37,12 @@ public class Main {
 
 	public static void main(String[] args) {
 
+		// starting Cayenne
+		CayenneServerRuntime cayenneRuntime = new CayenneServerRuntime(
+				"cayenne-UntitledDomain.xml");
+
 		// getting a hold of ObjectContext
-		ObjectContext context = DataContext.createDataContext();
+		ObjectContext context = cayenneRuntime.getContext();
 
 		newObjectsTutorial(context);
 		selectTutorial(context);

Modified: cayenne/main/trunk/tutorials/tutorial/src/main/resources/UntitledDomainMap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial/src/main/resources/UntitledDomainMap.map.xml?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial/src/main/resources/UntitledDomainMap.map.xml (original)
+++ cayenne/main/trunk/tutorials/tutorial/src/main/resources/UntitledDomainMap.map.xml Mon
May  3 03:36:59 2010
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0.0.1">
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
 	<property name="defaultPackage" value="org.apache.cayenne.tutorial.persistent"/>
 	<db-entity name="ARTIST">
 		<db-attribute name="DATE_OF_BIRTH" type="DATE"/>

Added: cayenne/main/trunk/tutorials/tutorial/src/main/resources/cayenne-UntitledDomain.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial/src/main/resources/cayenne-UntitledDomain.xml?rev=940358&view=auto
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial/src/main/resources/cayenne-UntitledDomain.xml (added)
+++ cayenne/main/trunk/tutorials/tutorial/src/main/resources/cayenne-UntitledDomain.xml Mon
May  3 03:36:59 2010
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="6">
+	<map name="UntitledDomainMap"/>
+
+	<node name="UntitledDomainNode"
+		 factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
+		 schema-update-strategy="org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy"
+		>
+		<map-ref name="UntitledDomainMap"/>
+		<data-source>
+			<driver value="org.apache.derby.jdbc.EmbeddedDriver"/>
+			<url value="jdbc:derby:memory:testdb;create=true"/>
+			<connectionPool min="1" max="1"/>
+			<login/>
+		</data-source>
+	</node>
+</domain>

Modified: cayenne/main/trunk/tutorials/tutorial/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial/src/main/webapp/WEB-INF/web.xml?rev=940358&r1=940357&r2=940358&view=diff
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial/src/main/webapp/WEB-INF/web.xml (original)
+++ cayenne/main/trunk/tutorials/tutorial/src/main/webapp/WEB-INF/web.xml Mon May  3 03:36:59
2010
@@ -28,11 +28,11 @@
 		DataContext
 	-->
 	<filter>
-		<filter-name>CayenneFilter</filter-name>
-		<filter-class>org.apache.cayenne.conf.WebApplicationContextFilter</filter-class>
+		<filter-name>cayenne-UntiltledDomain</filter-name>
+		<filter-class>org.apache.cayenne.configuration.web.CayenneFilter</filter-class>
 	</filter>
 	<filter-mapping>
-		<filter-name>CayenneFilter</filter-name>
+		<filter-name>cayenne-UntiltledDomain</filter-name>
 		<url-pattern>/*</url-pattern>
 	</filter-mapping>
 	<welcome-file-list>



Mime
View raw message