cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r442562 - in /incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server: ./ cayenne/ lib/ src/org/apache/cayenne/ropbrowser/ src/properties/ web/WEB-INF/ web/WEB-INF/lib/
Date Tue, 12 Sep 2006 11:28:32 GMT
Author: aadamchik
Date: Tue Sep 12 04:28:31 2006
New Revision: 442562

URL: http://svn.apache.org/viewvc?view=rev&rev=442562
Log:
CAY-634

Added:
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/lib/
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/lib/servlet.jar   (with props)
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/ConfigFilter.java
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/DBSetupHelper.java
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/properties/
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/properties/derby.properties
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/lib/velocity-1.3.jar
  (with props)
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/ropbrowser-dataload.sql
Removed:
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/lib/postgresql-8.1-405.jdbc2ee.jar
Modified:
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/.classpath
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.properties
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.xml
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserMap.map.xml
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserNode.driver.xml
    incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/web.xml

Modified: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/.classpath
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/.classpath?view=diff&rev=442562&r1=442561&r2=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/.classpath (original)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/.classpath Tue Sep 12 04:28:31
2006
@@ -1,18 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="cayenne"/>
-	<classpathentry sourcepath="G:/soc/smack-dev-2.2.1/source" kind="lib" path="web/WEB-INF/lib/smack-2.2.1.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/smackx-2.2.1.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/hessian-3.0.13.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/cayenne-jdk1.4-core-3.0-incubating-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/commons-collections-3.1.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/commons-lang-2.1.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/commons-logging.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/log4j-1.2.13.jar"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/ashwood-1.1.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/rop-browser"/>
-	<classpathentry kind="lib" path="web/WEB-INF/lib/postgresql-8.1-405.jdbc2ee.jar"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="cayenne"/>
+	<classpathentry sourcepath="G:/soc/smack-dev-2.2.1/source" kind="lib" path="web/WEB-INF/lib/smack-2.2.1.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/smackx-2.2.1.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/hessian-3.0.13.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/derby-10.1.3.1.jar"/>
+	<classpathentry sourcepath="/cayenne-jdk1.4-core/src/main/java" kind="lib" path="web/WEB-INF/lib/cayenne-jdk1.4-core-3.0-incubating-SNAPSHOT.jar"/>
+	<classpathentry sourcepath="G:/soc/commons-collections-3.1-src.zip" kind="lib" path="web/WEB-INF/lib/commons-collections-3.1.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/commons-lang-2.1.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/commons-logging.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/log4j-1.2.13.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/ashwood-1.1.jar"/>
+	<classpathentry kind="lib" path="web/WEB-INF/lib/velocity-1.3.jar"/>
+	<classpathentry kind="lib" path="lib/servlet.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/rop-browser"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Modified: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.properties
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.properties?view=diff&rev=442562&r1=442561&r2=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.properties (original)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.properties Tue Sep 12
04:28:31 2006
@@ -1,15 +1,6 @@
-# This can be overriden from command line to point to Eclipse location
+# This can be overridden from command line to point to Eclipse location
 eclipse.home = g:/eclipse
-
-server.src = ./src/org/apache/cayenne/ropbrowser/server
+# This can be overridden from command line to point to client location
 client.src = ../rop-browser/src/org/apache/cayenne/ropbrowser/model
+
 webxml = web/WEB-INF/web.xml
-cayenne.xml = ./cayenne/${_cayenne.xml}
-cayenneMap.xml = ./cayenne/${_cayenneMap.xml}
-cayenneNode.xml = ./cayenne/${_cayenneNode.xml}
-build.cayenne.xml = classes/${_cayenne.xml}
-build.cayenneMap.xml = classes/${_cayenneMap.xml}
-build.cayenneNode.xml = classes/${_cayenneNode.xml}
-_cayenne.xml = cayenne.xml
-_cayenneMap.xml = ropbrowserMap.map.xml
-_cayenneNode.xml = ropbrowserNode.driver.xml
\ No newline at end of file

Modified: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.xml?view=diff&rev=442562&r1=442561&r2=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.xml (original)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/build.xml Tue Sep 12 04:28:31
2006
@@ -6,7 +6,7 @@
 	
 	<path id="classpath">
 		<fileset dir="${eclipse.home}/plugins" includes="org.eclipse.ui.views_*.jar,org.eclipse.draw2d_*.jar"/>
-		<fileset dir="./lib" includes="**/*.jar"/>
+		<fileset dir="web/WEB-INF/lib" includes="**/*.jar"/>
 	</path>
 		
 	<target name="compile"
@@ -15,34 +15,30 @@
 	<target name="package" depends="compile,war"/>
 	
 	<target name="compile-client" description="compile the client classes">
-		<mkdir dir="build/client"/>
-	    <javac srcdir="${client.src}" destdir="build/client"
+		<mkdir dir="target/client"/>
+	    <javac srcdir="${client.src}" destdir="target/client"
 	    	classpathref="classpath"/>
 	</target>
 	
 	<target name="compile-server" description="compile the server classes">
-		<mkdir dir="build/server"/>
-	  <javac srcdir="${server.src}" destdir="build/server" classpathref="classpath" />
+		<mkdir dir="target/server"/>
+	  <javac srcdir="src/" destdir="target/server" classpathref="classpath" />
 	</target>
 	
 	<target name="war" description="create the war file">
-	  <copy file="${cayenne.xml}" todir="classes"/>
-	  <copy file="${cayenneMap.xml}" todir="classes"/>
-	  <copy file="${cayenneNode.xml}" todir="classes"/>
-	  <war destfile="build/rop-browser.war" webxml="${webxml}">
-	    <lib dir="lib"/>
+	  <war destfile="target/rop-browser.war" webxml="${webxml}">
+	    <lib dir="web/WEB-INF/lib"/>
 	    <lib dir="${eclipse.home}/plugins" includes="org.eclipse.ui.views_*.jar"/>
-	    <classes dir="build/client/"/>
-	    <classes dir="build/server/"/>
-	    <classes dir="classes"/>
-	    <webinf file="log4j.properties"/>
+	    <classes dir="target/client/"/>
+	    <classes dir="target/server/"/>
+	    <classes dir="cayenne"/>
+	    <webinf file="web/WEB-INF/log4j.properties"/>
 	  </war>
   	</target>
 	
 	<target name="clean" description="clean up" >
 	  <delete includeemptydirs="true">
-	    <fileset dir="build"/>
-	    <fileset dir="classes"/>
+	    <fileset dir="target"/>
 	  </delete>
 	</target>
 </project>

Modified: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserMap.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserMap.map.xml?view=diff&rev=442562&r1=442561&r2=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserMap.map.xml
(original)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserMap.map.xml
Tue Sep 12 04:28:31 2006
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <data-map project-version="1.1">
 	<property name="defaultPackage" value="org.apache.cayenne.ropbrowser.server"/>
 	<property name="clientSupported" value="true"/>
@@ -51,5 +51,9 @@
 	<query name="ArtistQuery" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity"
root-name="Artist">
 	</query>
 	<query name="GalleryQuery" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity"
root-name="Gallery">
+	</query>
+	<query name="schemaCheck" factory="org.objectstyle.cayenne.map.SQLTemplateBuilder" root="data-map"
root-name="ropbrowserMap">
+		<property name="cayenne.GenericSelectQuery.fetchingDataRows" value="true"/>
+		<sql><![CDATA[SELECT COUNT(*) FROM ARTIST]]></sql>
 	</query>
 </data-map>

Modified: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserNode.driver.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserNode.driver.xml?view=diff&rev=442562&r1=442561&r2=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserNode.driver.xml
(original)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/cayenne/ropbrowserNode.driver.xml
Tue Sep 12 04:28:31 2006
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<driver project-version="1.1" class="org.postgresql.Driver">
-	<url value="jdbc:postgresql://localhost:5432/ropbrowser"/>
+<driver project-version="1.1" class="org.apache.derby.jdbc.EmbeddedDriver">
+	<url value="jdbc:derby:ropbrowserdb;create=true"/>
 	<connectionPool min="1" max="1" />
-	<login userName="ropbrowser" password="ropbrowser"/>
 </driver>

Added: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/lib/servlet.jar
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/lib/servlet.jar?view=auto&rev=442562
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/lib/servlet.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/ConfigFilter.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/ConfigFilter.java?view=auto&rev=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/ConfigFilter.java
(added)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/ConfigFilter.java
Tue Sep 12 04:28:31 2006
@@ -0,0 +1,89 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.cayenne.ropbrowser;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.apache.cayenne.conf.Configuration;
+import org.apache.cayenne.conf.ServletUtil;
+
+/**
+ * A servlet filter that performs initial configuraion later makes sure a DataContext is
+ * bound to each request thread. Startup configurion includes configuring DAOs, setting up
+ * an embedded database, and sets up Cayenne.
+ * 
+ * @author Andrus Adamchik
+ */
+public class ConfigFilter implements Filter {
+
+    static final String DERBY_SYSTEM_PROPERTY = "derby.system.home";
+
+    public synchronized void init(FilterConfig config) throws ServletException {
+
+        prepareDerby();
+
+        // this will init Cayenne
+        ServletUtil.initializeSharedConfiguration(config.getServletContext());
+
+        new DBSetupHelper(config.getServletContext(), Configuration
+                .getSharedConfiguration()
+                .getDomain()).setupDatabase();
+    }
+
+    protected void prepareDerby() throws ServletException {
+        InputStream in = Thread
+                .currentThread()
+                .getContextClassLoader()
+                .getResourceAsStream("properties/derby.properties");
+        if (in != null) {
+            Properties props = new Properties();
+            
+            try {
+                props.load(in);
+            }
+            catch (IOException e) {
+                throw new ServletException("Error reading properties", e);
+            }
+
+            System.getProperties().putAll(props);
+        }
+
+        // setup Derby home to be Java TMP directory if not set explicitly
+
+        if (System.getProperty(DERBY_SYSTEM_PROPERTY) == null) {
+            System.setProperty(DERBY_SYSTEM_PROPERTY, System
+                    .getProperty("java.io.tmpdir"));
+        }
+
+    }
+
+	public void destroy() {
+		// empty
+	}
+
+	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
+		chain.doFilter(request, response);
+	}
+}

Added: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/DBSetupHelper.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/DBSetupHelper.java?view=auto&rev=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/DBSetupHelper.java
(added)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/org/apache/cayenne/ropbrowser/DBSetupHelper.java
Tue Sep 12 04:28:31 2006
@@ -0,0 +1,138 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.cayenne.ropbrowser;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.apache.cayenne.access.DataContext;
+import org.apache.cayenne.access.DataDomain;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.access.DbGenerator;
+import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.query.QueryChain;
+import org.apache.cayenne.query.SQLTemplate;
+import org.apache.cayenne.ropbrowser.server.Artist;
+
+/**
+ * Helper class to init test DB.
+ * 
+ * @author Andrus Adamchik
+ */
+class DBSetupHelper {
+
+    static final String TEST_DATA = "/WEB-INF/ropbrowser-dataload.sql";
+
+    ServletContext context;
+    DataDomain domain;
+
+    DBSetupHelper(ServletContext context, DataDomain domain) {
+        this.context = context;
+        this.domain = domain;
+    }
+
+    void setupDatabase() throws ServletException {
+        if (checkDBSetupNeeded()) {
+            setupDemoSchema();
+
+            InputStream in = context.getResourceAsStream(TEST_DATA);
+            if (in == null) {
+                throw new ServletException("Can't find  resource " + TEST_DATA);
+            }
+
+            setupDemoData(in);
+        }
+    }
+
+    private DataNode getDataNode() {
+        return domain.lookupDataNode(getDataMap());
+    }
+
+    private DataMap getDataMap() {
+        return domain.getEntityResolver().lookupObjEntity(Artist.class).getDataMap();
+    }
+
+    /**
+     * Runs a test query to see if a schema is initialized.
+     */
+    private boolean checkDBSetupNeeded() {
+        try {
+            DataContext.createDataContext().performNonSelectingQuery("schemaCheck");
+            return false;
+        }
+        catch (Throwable th) {
+            return true;
+        }
+    }
+
+    private void setupDemoSchema() throws ServletException {
+        DataNode node = getDataNode();
+        DbGenerator generator = new DbGenerator(node.getAdapter(), getDataMap());
+        try {
+            generator.runGenerator(node.getDataSource());
+        }
+        catch (Exception e) {
+            throw new ServletException("Error generating DB schema", e);
+        }
+    }
+
+    private void setupDemoData(InputStream sql) throws ServletException {
+
+        DataMap map = getDataMap();
+
+        // TODO: Andrus, 01/08/2006 - move code that loads SQL from file to QueryChain or
+        // some other Cayenne utilities class.
+        QueryChain chain = new QueryChain();
+        BufferedReader reader = new BufferedReader(new InputStreamReader(sql));
+        String line;
+        try {
+            while ((line = reader.readLine()) != null) {
+                line = line.trim();
+
+                if (line.length() == 0) {
+                    continue;
+                }
+
+                if (line.endsWith(";")) {
+                    line = line.substring(0, line.length() - 1);
+                }
+
+                chain.addQuery(new SQLTemplate(map, line));
+            }
+        }
+        catch (IOException e) {
+            throw new ServletException("Error reading " + TEST_DATA);
+        }
+        finally {
+            try {
+                reader.close();
+            }
+            catch (IOException e) {
+
+            }
+        }
+
+        if (!chain.isEmpty()) {
+            DataContext cayenneContext = DataContext.createDataContext();
+            cayenneContext.performNonSelectingQuery(chain);
+        }
+    }
+}

Added: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/properties/derby.properties
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/properties/derby.properties?view=auto&rev=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/properties/derby.properties
(added)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/src/properties/derby.properties
Tue Sep 12 04:28:31 2006
@@ -0,0 +1 @@
+#derby.system.home = /fullpath/to/desired/derby/location
\ No newline at end of file

Added: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/lib/velocity-1.3.jar
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/lib/velocity-1.3.jar?view=auto&rev=442562
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/lib/velocity-1.3.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/ropbrowser-dataload.sql
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/ropbrowser-dataload.sql?view=auto&rev=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/ropbrowser-dataload.sql
(added)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/ropbrowser-dataload.sql
Tue Sep 12 04:28:31 2006
@@ -0,0 +1,5 @@
+insert into Artist (artist_id, alive, artist_name, date_of_birth) values (1, 0, 'Van Gogh',
'1853-03-30');
+
+insert into Gallery (gallery_id, gallery_name) values (1, 'Musee d''Orsay');
+
+insert into Painting (artist_id, estimated_price, gallery_id, painting_id, painting_name)
values (1, 2500000, 1, 1, 'Portrait of Dr Gachet');
\ No newline at end of file

Modified: incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/web.xml?view=diff&rev=442562&r1=442561&r2=442562
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/web.xml (original)
+++ incubator/cayenne/soc/trunk/cayenne-rop/rop-browser-server/web/WEB-INF/web.xml Tue Sep
12 04:28:31 2006
@@ -37,4 +37,14 @@
 		<servlet-name>rop-browser</servlet-name>
 		<url-pattern>/rop-browser</url-pattern>
 	</servlet-mapping>
+	
+	<filter>
+		<filter-name>ConfigFilter</filter-name>
+		<filter-class>org.apache.cayenne.ropbrowser.ConfigFilter</filter-class>
+	</filter>
+	
+	<filter-mapping>
+		<filter-name>ConfigFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
 </web-app>



Mime
View raw message