You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2011/04/21 16:43:12 UTC

svn commit: r1095733 [1/2] - in /incubator/rave/trunk: ./ rave-portal/ rave-portal/src/main/db/ rave-portal/src/main/db/data/ rave-portal/src/main/db/sequences/ rave-portal/src/main/db/tables/ rave-portal/src/main/java/org/apache/rave/portal/model/ rav...

Author: mfranklin
Date: Thu Apr 21 14:43:10 2011
New Revision: 1095733

URL: http://svn.apache.org/viewvc?rev=1095733&view=rev
Log:
Annotated Model objects as Entities
Updated application context to support JPA
Updated test context with test data and table creation scripts using modified code from OSEC
Created unit test for Page repository method

Added:
    incubator/rave/trunk/rave-portal/src/main/db/
    incubator/rave/trunk/rave-portal/src/main/db/data/
    incubator/rave/trunk/rave-portal/src/main/db/data/initial_data.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/
    incubator/rave/trunk/rave-portal/src/main/db/sequences/create_all_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/page_id_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/page_layout_id_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/person_id_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/region_id_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/region_widget_id_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/sequences/widget_id_seq.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/
    incubator/rave/trunk/rave-portal/src/main/db/tables/create_all_tables.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/page.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/page_layout.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/person.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/region.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/region_widget.sql
    incubator/rave/trunk/rave-portal/src/main/db/tables/widget.sql
    incubator/rave/trunk/rave-portal/src/main/resources/META-INF/
    incubator/rave/trunk/rave-portal/src/main/resources/META-INF/persistence.xml
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dataContext.xml
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dispatcher-servlet.xml
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/datasource/
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/datasource/PrePopulatedDataSourceFactory.java
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/datasource/util/
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/datasource/util/SqlFileParser.java
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/repository/
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/repository/JpaPageRepositoryTest.java
    incubator/rave/trunk/rave-portal/src/test/resources/log4j.xml
    incubator/rave/trunk/rave-portal/src/test/resources/test-context.xml
    incubator/rave/trunk/rave-portal/src/test/resources/test-data.sql
Modified:
    incubator/rave/trunk/pom.xml
    incubator/rave/trunk/rave-portal/pom.xml
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Page.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/PageLayout.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Person.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Region.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/RegionWidget.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Widget.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/repository/impl/JpaPageRepository.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/service/impl/DefaultUserService.java
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext.xml
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml

Modified: incubator/rave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/pom.xml?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/pom.xml (original)
+++ incubator/rave/trunk/pom.xml Thu Apr 21 14:43:10 2011
@@ -23,181 +23,204 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
-  <modelVersion>4.0.0</modelVersion>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.rave</groupId>
+        <artifactId>rave-master</artifactId>
+        <version>0.1-incubating-SNAPSHOT</version>
+        <relativePath>../rave-master-pom/pom.xml</relativePath>
+    </parent>
 
-  <parent>
     <groupId>org.apache.rave</groupId>
-    <artifactId>rave-master</artifactId>
+    <artifactId>rave-project</artifactId>
+    <name>Apache Rave :: rave-project</name>
+    <description>Apache Rave Project</description>
+    <packaging>pom</packaging>
     <version>0.1-incubating-SNAPSHOT</version>
-    <relativePath>../rave-master-pom/pom.xml</relativePath>
-  </parent>
 
-  <groupId>org.apache.rave</groupId>
-  <artifactId>rave-project</artifactId>
-  <name>Apache Rave :: rave-project</name>
-  <description>Apache Rave Project</description>
-  <packaging>pom</packaging>
-  <version>0.1-incubating-SNAPSHOT</version>
-  
-  <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/rave/trunk</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/rave/trunk</developerConnection>
-    <url>http://svn.apache.org/viewvc/incubator/rave/trunk/</url>
-  </scm>
-  
-  <properties>
-    <apache.shindig.version>2.0.2</apache.shindig.version>
-    <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
-    <jstl.version>1.2</jstl.version>
-    <javax.servlet.version>2.5</javax.servlet.version>
-    <org.slf4j.version>1.6.1</org.slf4j.version>
-    <log4j.version>1.2.16</log4j.version>
-    <junit.version>4.7</junit.version>
-    <commons-lang.version>2.6</commons-lang.version>
-    <icu4j.version>4.6.1</icu4j.version>
-  </properties>
-
-  <repositories>
-    <repository>
-      <id>java.net</id>
-      <url>http://download.java.net/maven/2/</url>
-    </repository>
-  </repositories>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/rave/trunk</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/rave/trunk</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/rave/trunk/</url>
+    </scm>
+
+    <properties>
+        <apache.shindig.version>2.0.2</apache.shindig.version>
+        <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
+        <jstl.version>1.2</jstl.version>
+        <javax.servlet.version>2.5</javax.servlet.version>
+        <org.slf4j.version>1.6.1</org.slf4j.version>
+        <log4j.version>1.2.16</log4j.version>
+        <junit.version>4.7</junit.version>
+        <commons-lang.version>2.6</commons-lang.version>
+        <icu4j.version>4.6.1</icu4j.version>
+        <easymock.version>3.0</easymock.version>
+        <openjpa-all.version>2.1.0</openjpa-all.version>
+    </properties>
+
+    <repositories>
+        <repository>
+            <id>java.net</id>
+            <url>http://download.java.net/maven/2/</url>
+        </repository>
+    </repositories>
+
+    <!-- Global management of all dependencies -->
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.shindig</groupId>
+                <artifactId>shindig-server</artifactId>
+                <version>${apache.shindig.version}</version>
+                <type>war</type>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-webmvc</artifactId>
+                <version>${org.springframework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-jdbc</artifactId>
+                <version>${org.springframework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-orm</artifactId>
+                <version>${org.springframework.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>javax.servlet</groupId>
+                <artifactId>jstl</artifactId>
+                <version>${jstl.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.openjpa</groupId>
+                <artifactId>openjpa-all</artifactId>
+                <version>${openjpa-all.version}</version>
+            </dependency>
+
+            <!-- Logging -->
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${org.slf4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>jcl-over-slf4j</artifactId>
+                <version>${org.slf4j.version}</version>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-log4j12</artifactId>
+                <version>${org.slf4j.version}</version>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>${log4j.version}</version>
+                <scope>runtime</scope>
+            </dependency>
+
+            <!-- Language and localization -->
+            <dependency>
+                <groupId>com.ibm.icu</groupId>
+                <artifactId>icu4j</artifactId>
+                <version>${icu4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-lang</groupId>
+                <artifactId>commons-lang</artifactId>
+                <version>${commons-lang.version}</version>
+            </dependency>
+
+            <!-- Rave artifacts -->
+            <dependency>
+                <groupId>org.apache.rave</groupId>
+                <artifactId>rave-shindig</artifactId>
+                <version>${project.version}</version>
+                <type>war</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.rave</groupId>
+                <artifactId>rave-portal</artifactId>
+                <version>${project.version}</version>
+                <type>war</type>
+            </dependency>
 
-  <!-- Global management of all dependencies -->
-  <dependencyManagement>
+        </dependencies>
+    </dependencyManagement>
+
+    <!-- Global dependencies (provided or test scope only) -->
     <dependencies>
-      <dependency>
-        <groupId>org.apache.shindig</groupId>
-        <artifactId>shindig-server</artifactId>
-        <version>${apache.shindig.version}</version>
-        <type>war</type>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-webmvc</artifactId>
-        <version>${org.springframework.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>jstl</artifactId>
-        <version>${jstl.version}</version>
-      </dependency>
-
-      <!-- Logging -->
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>slf4j-api</artifactId>
-        <version>${org.slf4j.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>jcl-over-slf4j</artifactId>
-        <version>${org.slf4j.version}</version>
-        <scope>runtime</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>slf4j-log4j12</artifactId>
-        <version>${org.slf4j.version}</version>
-        <scope>runtime</scope>
-      </dependency>
-      <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>${log4j.version}</version>
-        <scope>runtime</scope>
-      </dependency>
-
-      <!-- Language and localization -->
-      <dependency>
-        <groupId>com.ibm.icu</groupId>
-        <artifactId>icu4j</artifactId>
-        <version>${icu4j.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>commons-lang</groupId>
-        <artifactId>commons-lang</artifactId>
-        <version>${commons-lang.version}</version>
-      </dependency>
+        <!-- Servlet spec -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>${javax.servlet.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Exclude commons-logging by adding it as a provided dependency -->
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>[1,)</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Test -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <version>${easymock.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>${org.springframework.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
-      <!-- Rave artifacts -->
-      <dependency>
-        <groupId>org.apache.rave</groupId>
-        <artifactId>rave-shindig</artifactId>
-        <version>${project.version}</version>
-        <type>war</type>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.rave</groupId>
-        <artifactId>rave-portal</artifactId>
-        <version>${project.version}</version>
-        <type>war</type>
-      </dependency>
+    <build>
+        <defaultGoal>install</defaultGoal>
 
-    </dependencies>
-  </dependencyManagement>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>2.3.2</version>
+                    <configuration>
+                        <source>1.6</source>
+                        <target>1.6</target>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-war-plugin</artifactId>
+                    <version>2.1.1</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+
+    </build>
+
+    <modules>
+        <module>rave-shindig</module>
+        <module>rave-portal</module>
+    </modules>
 
-  <!-- Global dependencies (provided or test scope only) -->  
-  <dependencies>
-    <!-- Servlet spec -->
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>${javax.servlet.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    
-    <!-- Exclude commons-logging by adding it as a provided dependency -->
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>[1,)</version>
-      <scope>provided</scope>
-    </dependency>
-    
-    <!-- Test -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.easymock</groupId>
-      <artifactId>easymock</artifactId>
-      <version>3.0</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  
-  <build>
-    <defaultGoal>install</defaultGoal>
-
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-compiler-plugin</artifactId>
-          <version>2.3.2</version>
-          <configuration>
-            <source>1.6</source>
-            <target>1.6</target>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-war-plugin</artifactId>
-          <version>2.1.1</version>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    
-  </build>
-  
-  <modules>
-    <module>rave-shindig</module>
-    <module>rave-portal</module>
-  </modules>
-  
 </project>

Modified: incubator/rave/trunk/rave-portal/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/pom.xml?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/pom.xml (original)
+++ incubator/rave/trunk/rave-portal/pom.xml Thu Apr 21 14:43:10 2011
@@ -23,139 +23,185 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
-  <modelVersion>4.0.0</modelVersion>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.rave</groupId>
+        <artifactId>rave-project</artifactId>
+        <version>0.1-incubating-SNAPSHOT</version>
+    </parent>
 
-  <parent>
     <groupId>org.apache.rave</groupId>
-    <artifactId>rave-project</artifactId>
+    <artifactId>rave-portal</artifactId>
+    <name>Apache Rave :: rave-portal</name>
+    <description>Apache Rave Portal</description>
+    <packaging>war</packaging>
     <version>0.1-incubating-SNAPSHOT</version>
-  </parent>
 
-  <groupId>org.apache.rave</groupId>
-  <artifactId>rave-portal</artifactId>
-  <name>Apache Rave :: rave-portal</name>
-  <description>Apache Rave Portal</description>
-  <packaging>war</packaging>
-  <version>0.1-incubating-SNAPSHOT</version>
-  
-  <properties>
-    <cargo.version>1.1.0-SNAPSHOT</cargo.version>
-    <!-- if you want a remote debugging on a different a address
-         override on command line with -Dcargo.debug.addres=xxxx -->
-    <cargo.debug.address>8000</cargo.debug.address>
-    <!-- if you want to start remote debugging session suspended
-         override on command line with -Dcargo.debug.suspend=y -->
-    <cargo.debug.suspend>n</cargo.debug.suspend>
-    <!-- default empty javaagent
-         if needed you can specify it on the command line with -Djavaagent="..." -->
-    <javaagent></javaagent>
-  </properties>
-  
-  <pluginRepositories>
-    <!-- Temporary codehaus-snapshots repository for cargo 1.1.0-SNAPSHOT plugin -->
-    <pluginRepository>
-      <id>codehaus-snapshots</id>
-      <name>Codehaus SNAPSHOTS</name>
-      <url>http://ci.repository.codehaus.org/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </pluginRepository>
-  </pluginRepositories>
-  
-  <dependencies>
-  
-    <dependency>
-      <groupId>org.apache.rave</groupId>
-      <artifactId>rave-shindig</artifactId>
-      <type>war</type>
-      <scope>provided</scope>
-    </dependency>
-  
-    <!-- Spring -->
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
-
-    <!-- JSTL -->
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>jstl</artifactId>
-    </dependency>
-    
-    <!-- Logging -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>com.ibm.icu</groupId>
-      <artifactId>icu4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <defaultGoal>install</defaultGoal>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.cargo</groupId>
-        <artifactId>cargo-maven2-plugin</artifactId>
-        <version>${cargo.version}</version>
-        <configuration>
-          <wait>true</wait>
-          <configuration>
-            <properties>
-              <cargo.jvmargs>
-                <![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify ${javaagent}]]>
-              </cargo.jvmargs>
-            </properties>
-            <home>${project.build.directory}/tomcat6x</home>
-            <deployables>
-              <deployable>
-                <groupId>org.apache.rave</groupId>
-                <artifactId>rave-shindig</artifactId>
-                <type>war</type>
-                <properties>
-                  <context>/ROOT</context>
-                </properties>
-              </deployable>
-              <deployable>
-                <groupId>org.apache.rave</groupId>
-                <artifactId>rave-portal</artifactId>
-                <type>war</type>
-                <properties>
-                  <context>/portal</context>
-                </properties>
-              </deployable>
-            </deployables>
-          </configuration>
-          <container>
-            <containerId>tomcat6x</containerId>
-            <zipUrlInstaller>
-              <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz</url>
-            </zipUrlInstaller>
-          </container>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
+    <properties>
+        <cargo.version>1.1.0-SNAPSHOT</cargo.version>
+        <!-- if you want a remote debugging on a different a address
+  override on command line with -Dcargo.debug.addres=xxxx -->
+        <cargo.debug.address>8000</cargo.debug.address>
+        <!-- if you want to start remote debugging session suspended
+  override on command line with -Dcargo.debug.suspend=y -->
+        <cargo.debug.suspend>n</cargo.debug.suspend>
+        <!-- default empty javaagent
+if needed you can specify it on the command line with -Djavaagent="..." -->
+        <javaagent></javaagent>
+
+        <com.h2database.version>1.3.154</com.h2database.version>
+    </properties>
+
+    <pluginRepositories>
+        <!-- Temporary codehaus-snapshots repository for cargo 1.1.0-SNAPSHOT plugin -->
+        <pluginRepository>
+            <id>codehaus-snapshots</id>
+            <name>Codehaus SNAPSHOTS</name>
+            <url>http://ci.repository.codehaus.org/</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.rave</groupId>
+            <artifactId>rave-shindig</artifactId>
+            <type>war</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Spring -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+        </dependency>
+
+
+         <!--Persistence-->
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-all</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>${com.h2database.version}</version>
+        </dependency>
+
+        <!-- JSTL -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+        </dependency>
+
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ibm.icu</groupId>
+            <artifactId>icu4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <defaultGoal>install</defaultGoal>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>openjpa-maven-plugin</artifactId>
+                <version>1.2</version>
+                <configuration>
+                    <includes>org/apache/rave/portal/model/*.class</includes>
+                    <addDefaultConstructor>true</addDefaultConstructor>
+                    <!--<enforcePropertyRestrictions>true</enforcePropertyRestrictions>-->
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>enhancer</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.cargo</groupId>
+                <artifactId>cargo-maven2-plugin</artifactId>
+                <version>${cargo.version}</version>
+                <configuration>
+                    <wait>true</wait>
+                    <configuration>
+                        <properties>
+                            <cargo.jvmargs>
+                                <![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify ${javaagent}]]>
+                            </cargo.jvmargs>
+                        </properties>
+                        <home>${project.build.directory}/tomcat6x</home>
+                        <deployables>
+                            <deployable>
+                                <groupId>org.apache.rave</groupId>
+                                <artifactId>rave-shindig</artifactId>
+                                <type>war</type>
+                                <properties>
+                                    <context>/ROOT</context>
+                                </properties>
+                            </deployable>
+                            <deployable>
+                                <groupId>org.apache.rave</groupId>
+                                <artifactId>rave-portal</artifactId>
+                                <type>war</type>
+                                <properties>
+                                    <context>/portal</context>
+                                </properties>
+                            </deployable>
+                        </deployables>
+                    </configuration>
+                    <container>
+                        <containerId>tomcat6x</containerId>
+                        <zipUrlInstaller>
+                            <url>
+                                http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
+                            </url>
+                        </zipUrlInstaller>
+                    </container>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/data/initial_data.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/data/initial_data.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/data/initial_data.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/data/initial_data.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,62 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+
+--  --- start person data ---
+insert into person (user_id) values (set(@user_id_1, 'canonical'));
+insert into person (user_id) values (set(@user_id_2, 'john.doe'));
+insert into person (user_id) values (set(@user_id_3, 'jane.doe'));
+insert into person (user_id) values (set(@user_id_4, 'george.doe'));
+insert into person (user_id) values (set(@user_id_5, 'mario.rossi'));
+insert into person (user_id) values (set(@user_id_6, 'maija.m'));
+--- end person data ---
+
+--- gadget data ---
+-- wikipedia widget
+insert into widget (id, title, url)
+values(set(@wikipedia_widget_id, next value for widget_id_seq), 'Wikipedia','http://www.google.com/ig/modules/wikipedia.xml');
+
+-- translate widget
+insert into widget (id, title, url)
+values(set(@translate_widget_id, next value for widget_id_seq), 'Translate Gadget', 'http://www.google.com/ig/modules/dictionary.xml');
+
+-- nytimes widget
+insert into widget (id, title, url)
+values(set(@nyt_widget_id, next value for widget_id_seq), 'NYTimes.com - Top Stories', 'http://widgets.nytimes.com/packages/html/igoogle/topstories.xml');
+
+-- google tabbed news widget
+insert into widget (id, title, url)
+values(set(@tabnews_widget_id, next value for widget_id_seq), 'Google News Gadget', 'http://www.gstatic.com/ig/modules/tabnews/tabnews.xml');
+
+-- end widget data ----
+
+
+--- start page layout data ---
+insert into page_layout (id, code,  number_of_regions)
+values (next value for page_layout_id_seq, 'columns_1', 1);
+insert into page_layout (id, code,  number_of_regions)
+values (set(@two_col_id, next value for page_layout_id_seq), 'columns_2', 2);
+insert into page_layout (id, code,  number_of_regions)
+values (next value for page_layout_id_seq, 'columns_2wn', 2);
+insert into page_layout (id, code,  number_of_regions)
+values (next value for page_layout_id_seq, 'columns_3', 3);
+insert into page_layout (id, code,  number_of_regions)
+values (next value for page_layout_id_seq, 'columns_3nwn', 3);
+insert into page_layout (id, code,  number_of_regions)
+values (next value for page_layout_id_seq, 'columns_4', 4);
+insert into page_layout (id, code,  number_of_regions)
+values (next value for page_layout_id_seq, 'columns_3nwn_1_bottom', 4);
+--- end page layout data ----

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/create_all_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/create_all_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/create_all_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/create_all_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,22 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+@@page_id_seq.sql
+@@page_layout_id_seq.sql
+@@person_id_seq.sql
+@@region_id_seq.sql
+@@region_widget_id_seq.sql
+@@widget_id_seq.sql
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/page_id_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/page_id_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/page_id_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/page_id_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,20 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create sequence page_id_seq
+  start with 1
+  increment by 1
+  cache 10;

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/page_layout_id_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/page_layout_id_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/page_layout_id_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/page_layout_id_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,20 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create sequence page_layout_id_seq
+  start with 1
+  increment by 1
+  cache 10;
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/person_id_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/person_id_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/person_id_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/person_id_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,20 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create sequence person_id_seq
+  start with 1
+  increment by 1
+  cache 10;
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/region_id_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/region_id_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/region_id_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/region_id_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,20 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create sequence region_id_seq
+  start with 1
+  increment by 1
+  cache 10;
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/region_widget_id_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/region_widget_id_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/region_widget_id_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/region_widget_id_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,20 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create sequence region_widget_id_seq
+  start with 1
+  increment by 1
+  cache 10;
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/sequences/widget_id_seq.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/sequences/widget_id_seq.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/sequences/widget_id_seq.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/sequences/widget_id_seq.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,20 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create sequence widget_id_seq
+  start with 1
+  increment by 1
+  cache 10;
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/create_all_tables.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/create_all_tables.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/create_all_tables.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/create_all_tables.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,23 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+
+@@person.sql
+@@page_layout.sql
+@@widget.sql
+@@page.sql
+@@region.sql
+@@region_widget.sql
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/page.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/page.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/page.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/page.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,36 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create table page
+(
+    id                   number(38)    not null,
+    name                 varchar2(100) not null,
+    owner_id             varchar2(50)  not null,
+    page_layout_id       number(38)    not null,
+    render_sequence      number(10)    not null,
+    constraint page_pk
+        primary key (id)
+);
+
+alter table page
+add constraint page_person_id_fk
+foreign key (owner_id)
+references person (user_id);
+
+alter table page
+add constraint page_layout_id_fk
+foreign key (page_layout_id)
+references page_layout (id);

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/page_layout.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/page_layout.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/page_layout.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/page_layout.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,26 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create table page_layout
+(
+   id                     number(38) not null,
+   code                   varchar2(50) not null,
+   number_of_regions      number(10) not null,
+   constraint page_layout_pk
+        primary key (id),
+   constraint unq_page_layout_layout_name
+        unique (code)
+);
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/person.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/person.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/person.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/person.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,22 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create table person
+(
+  user_id            varchar2(50)    not null,
+  constraint  person_pk
+    primary key (user_id)
+);
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/region.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/region.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/region.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/region.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,30 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create table region
+(
+    id              number(38)    not null,
+    page_id         number(38)    not null,
+
+    constraint region_pk
+        primary key (id)
+
+);
+
+alter table region
+add constraint region_page_id_fk
+foreign key (page_id)
+references page (id);
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/region_widget.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/region_widget.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/region_widget.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/region_widget.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,38 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create table region_widget
+(
+    id                number(38)  not null,
+    widget_id         number(38)  not null,
+    region_id         number(38)  not null,
+    render_position   number(10)  not null,
+    collapsed         varchar2(1) not null,
+    constraint region_widget_pk
+        primary key (id),
+    constraint chk_region_widget_collapsed
+        check (collapsed in ('Y','N'))
+);
+
+alter table region_widget
+add constraint region_widget_region_id_fk
+foreign key (region_id)
+references region (id);
+
+alter table region_widget
+add constraint region_widget_widget_id_fk
+foreign key (widget_id)
+references widget (id);
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/db/tables/widget.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/db/tables/widget.sql?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/db/tables/widget.sql (added)
+++ incubator/rave/trunk/rave-portal/src/main/db/tables/widget.sql Thu Apr 21 14:43:10 2011
@@ -0,0 +1,26 @@
+ -- Licensed to the Apache Software Foundation (ASF) under one
+ -- or more contributor license agreements.  See the NOTICE file
+ -- distributed with this work for additional information
+ -- regarding copyright ownership.  The ASF licenses this file
+ -- to you 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.
+create table widget
+(
+    id                  number(38)     not null,
+    title               varchar2(100)  not null,
+    url	                varchar2(200)  not null,
+    constraint  widget_pk
+        primary key (id),
+    constraint  widget_url_unq
+        unique (url)
+);
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Page.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Page.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Page.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Page.java Thu Apr 21 14:43:10 2011
@@ -18,18 +18,41 @@
  */
 package org.apache.rave.portal.model;
 
+import javax.persistence.*;
 import java.util.List;
 
 /**
  * A page, which consists of regions, and which may be owned by a {@link Person} (note the ownership will likely need to
  * become more flexible to enable things like group ownership in the future).
  */
+@Entity
+@Table(name="page")
+@SequenceGenerator(name="pageIdSeq", sequenceName = "page_id_seq")
+@NamedQueries({
+        @NamedQuery(name = "Page.getByUserId", query="SELECT p FROM Page p WHERE p.owner.userId = :userId")
+})
+@Access(AccessType.FIELD)
 public class Page {
+    @Id @Column(name="id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "pageIdSeq")
     private Long id;
+
+    @Basic @Column(name="name")
     private String name;
+
+    @ManyToOne
+    @JoinColumn(name = "owner_id")
     private Person owner;
+
+    @Basic @Column(name="render_sequence")
     private Long renderSequence;
+
+    @ManyToOne
+    @JoinColumn(name="page_layout_id")
     private PageLayout pageLayout;
+
+    @OneToMany(fetch = FetchType.EAGER)
+    @JoinColumn(name="page_id")
     private List<Region> regions;
 
     /**

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/PageLayout.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/PageLayout.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/PageLayout.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/PageLayout.java Thu Apr 21 14:43:10 2011
@@ -19,12 +19,23 @@
 
 package org.apache.rave.portal.model;
 
+import javax.persistence.*;
+
 /**
  * Represents an organization of regions within a page that is supported by the rendering engine
  */
+@Entity
+@Table(name="page_layout")
+@SequenceGenerator(name="pageLayoutIdSeq", sequenceName = "page_layout_id_seq")
 public class PageLayout {
+    @Id @Column(name="id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "pageLayoutIdSeq")
     private Long id;
+
+    @Basic @Column(name="code")
     private String code;
+
+    @Basic @Column(name="number_of_regions")
     private Long numberOfRegions;
 
     /**

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Person.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Person.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Person.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Person.java Thu Apr 21 14:43:10 2011
@@ -18,10 +18,17 @@
  */
 package org.apache.rave.portal.model;
 
+import javax.persistence.*;
+
 /**
  * A person
  */
+@Entity
+@Table(name="person")
+@SequenceGenerator(name="personIdSeq", sequenceName = "person_id_seq")
 public class Person {
+    @Id @Column(name="user_id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "personIdSeq")
     private String userId;
 
     public Person() {

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Region.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Region.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Region.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Region.java Thu Apr 21 14:43:10 2011
@@ -18,13 +18,23 @@
  */
 package org.apache.rave.portal.model;
 
+import javax.persistence.*;
 import java.util.List;
 
 /**
  * A region of a page, which can contain widget instances {@link RegionWidget}
  */
+@Entity
+@Table(name="region")
+@SequenceGenerator(name="regionIdSeq", sequenceName = "region_id_seq")
+@Access(AccessType.FIELD)
 public class Region {
+    @Id @Column(name="id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "regionIdSeq")
     private Long id;
+
+    @OneToMany(fetch = FetchType.EAGER)
+    @JoinColumn(name = "region_id")
     private List<RegionWidget> regionWidgets;
 
     /**

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/RegionWidget.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/RegionWidget.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/RegionWidget.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/RegionWidget.java Thu Apr 21 14:43:10 2011
@@ -18,15 +18,31 @@
  */
 package org.apache.rave.portal.model;
 
+import javax.persistence.*;
+
 /**
  * A widget within a region
  */
+@Entity
+@Table(name="region_widget")
+@SequenceGenerator(name="regionWidgetIdSeq", sequenceName = "region_widget_id_seq")
 public class RegionWidget {
+    @Id @Column(name="id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "regionWidgetIdSeq")
     private Long id;
+
+    @ManyToOne
+    @JoinColumn(name="widget_id")
     private Widget widget;
+
+    @Basic @Column(name="render_position")
     private String renderPosition;
+
+    @Transient
+    //@Basic @Column(name="collapsed")
     private boolean collapsed;
 
+
     /**
      * Gets the persistence unique identifier
      *

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Widget.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Widget.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Widget.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/model/Widget.java Thu Apr 21 14:43:10 2011
@@ -20,15 +20,29 @@ package org.apache.rave.portal.model;
 
 import org.apache.rave.portal.model.util.InternationalString;
 
+import javax.persistence.*;
 import java.net.URL;
 
 /**
  * A widget
  */
+@Entity
+@Table(name="widget")
+@SequenceGenerator(name="widgetIdSeq", sequenceName = "widget_id_seq")
 public class Widget {
+    @Id @Column(name="id")
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "widgetIdSeq")
     private Long id;
+
+    /*
+        TODO: Figure out what the OpenJPA strategy is for functionality provided by Eclisplink's @Convert
+     */
+
+    @Transient
     private InternationalString title;
-    private URL url;
+
+    @Basic @Column(name="url")
+    private String url;
 
     /**
      * Gets the persistence unique identifier
@@ -51,11 +65,11 @@ public class Widget {
         this.title = title;
     }
 
-    public URL getUrl() {
+    public String getUrl() {
         return url;
     }
 
-    public void setUrl(URL url) {
+    public void setUrl(String url) {
         this.url = url;
     }
 }
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/repository/impl/JpaPageRepository.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/repository/impl/JpaPageRepository.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/repository/impl/JpaPageRepository.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/repository/impl/JpaPageRepository.java Thu Apr 21 14:43:10 2011
@@ -19,86 +19,26 @@
 
 package org.apache.rave.portal.repository.impl;
 
-import org.apache.rave.portal.model.*;
-import org.apache.rave.portal.model.util.InternationalString;
-import org.apache.rave.portal.model.util.LocalizedString;
+import org.apache.rave.portal.model.Page;
 import org.apache.rave.portal.repository.PageRepository;
 import org.springframework.stereotype.Repository;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
 import java.util.List;
 
 @Repository
 public class JpaPageRepository implements PageRepository {
 
+    @PersistenceContext
+    private EntityManager manager;
+
     @Override
+    @SuppressWarnings("unchecked")
     public List<Page> getAllPages(String userId) {
-        /**************************************************************************************************************
-         ***************************************************************************************************************
-         TODO: Returning a static set of mock data here while we decide if this model looks right - if it does we can go
-         ahead and add JPA annotations to our models and start using real persistence.
-         ***************************************************************************************************************
-         **************************************************************************************************************/
-
-        long widgetId = 1;
-        Region region1 = new Region();
-        region1.setId(1L);
-        ArrayList<RegionWidget> region1Widgets = new ArrayList<RegionWidget>();
-        region1Widgets.add(getRegionWidget("http://www.labpixies.com/campaigns/todo/todo.xml", "LabPixies Todo",
-                widgetId++));
-        region1Widgets.add(getRegionWidget("http://widgets.nytimes.com/packages/html/igoogle/topstories.xml",
-                "The New York Times", widgetId++));
-        region1.setRegionWidgets(region1Widgets);
-
-        Region region2 = new Region();
-        region2.setId(2L);
-        ArrayList<RegionWidget> region2Widgets = new ArrayList<RegionWidget>();
-        region2Widgets.add(getRegionWidget(
-                "http://www.flightstats.com/go/FlightStatus/AddGoogleHomePageFlightStatus.module", "Flight Status",
-                widgetId++));
-        region2Widgets.add(getRegionWidget("http://hosting.gmodules.com/ig/gadgets/file/100674619146546250953/wsj.xml",
-                "The Wall Street Journal", widgetId++));
-        region2.setRegionWidgets(region2Widgets);
-
-        PageLayout pageLayout = new PageLayout();
-        pageLayout.setId(1L);
-        pageLayout.setCode("one-column");
-        pageLayout.setNumberOfRegions(1L);
-
-        Person person = new Person();
-        person.setUserId(userId);
-
-        Page page = new Page();
-        page.setId(1L);
-        page.setName("Default Page");
-        page.setOwner(person);
-        page.setRenderSequence(1L);
-        page.setPageLayout(pageLayout);
-        page.setRegions(Arrays.asList(region1, region2));
-
-        return Arrays.asList(page);
-    }
-
-    private RegionWidget getRegionWidget(String specificationUrl, String title, Long id) {
-        Widget widget = new Widget();
-        InternationalString widgetTitle = new InternationalString();
-        widgetTitle.setLocalizedString(new LocalizedString(title, "en"));
-        widget.setTitle(widgetTitle);
-        widget.setId(id);
-        try {
-            widget.setUrl(new URL(specificationUrl));
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        }
-
-        RegionWidget regionWidget = new RegionWidget();
-        regionWidget.setId(id);
-        regionWidget.setWidget(widget);
-        regionWidget.setRenderPosition(String.valueOf(id));
-        regionWidget.setCollapsed(false);
-        return regionWidget;
+        Query query = manager.createNamedQuery("Page.getByUserId");
+        query.setParameter("userId", userId);
+        return query.getResultList();
     }
 }
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/service/impl/DefaultUserService.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/service/impl/DefaultUserService.java?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/service/impl/DefaultUserService.java (original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/service/impl/DefaultUserService.java Thu Apr 21 14:43:10 2011
@@ -29,7 +29,7 @@ public class DefaultUserService implemen
     public Person getAuthenticatedUser() {
         //TODO: Returning mock data until we hook in real authentication
         Person person = new Person();
-        person.setUserId("jcian");
+        person.setUserId("canonical");
         return person;
     }
 }
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/resources/META-INF/persistence.xml?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/resources/META-INF/persistence.xml (added)
+++ incubator/rave/trunk/rave-portal/src/main/resources/META-INF/persistence.xml Thu Apr 21 14:43:10 2011
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+            version="2.0">
+        <persistence-unit name="ravePersistenceUnit" transaction-type="RESOURCE_LOCAL">
+    		<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+            <class>org.apache.rave.portal.model.Page</class>
+            <class>org.apache.rave.portal.model.Region</class>
+            <class>org.apache.rave.portal.model.Person</class>
+            <class>org.apache.rave.portal.model.RegionWidget</class>
+            <class>org.apache.rave.portal.model.Widget</class>
+            <class>org.apache.rave.portal.model.PageLayout</class>
+        </persistence-unit>
+</persistence>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext.xml?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/applicationContext.xml Thu Apr 21 14:43:10 2011
@@ -20,26 +20,36 @@
   $Id$
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:context="http://www.springframework.org/schema/context"
-    xmlns:mvc="http://www.springframework.org/schema/mvc"
-    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
 
-  <!-- Scans the classpath of this application for @Components to deploy as beans -->
-  <context:component-scan base-package="org.apache.rave.portal" />
+    <context:component-scan base-package="org.apache.rave" annotation-config="true" />
 
-  <!-- Configures the @Controller programming model -->
-  <mvc:annotation-driven />
+    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+        <property name="entityManagerFactory" ref="entityManagerFactory"/>
+    </bean>
 
-  <!-- Forwards requests to the "/" resource to the "home" view -->
-  <mvc:view-controller path="/" view-name="home" />
-
-  <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory -->
-  <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
-    <property name="prefix" value="/WEB-INF/views/" />
-    <property name="suffix" value=".jsp" />
-  </bean>
-
-</beans>
\ No newline at end of file
+    <bean id="entityManagerFactory"
+          class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+        <property name="persistenceUnitName" value="ravePersistenceUnit"/>
+        <property name="dataSource" ref="dataSource"/>
+        <property name="jpaVendorAdapter">
+            <!--<bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter" >-->
+            <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
+                <property name="showSql" value="true" />
+            </bean>
+        </property>
+        <property name="jpaPropertyMap">
+            <map>
+                <!--<entry key="eclipselink.weaving" value="false"/>-->
+                <entry key="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>
+                <entry key="openjpa.RuntimeUnenhancedClasses" value="unsupported"/>
+                <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+            </map>
+        </property>
+    </bean>
+</beans>

Added: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dataContext.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dataContext.xml?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dataContext.xml (added)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dataContext.xml Thu Apr 21 14:43:10 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+        <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+            <property name="url" value="jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1"/>
+            <property name="driverClassName" value="org.h2.Driver" />
+            <property name="username" value="sa" />
+            <property name="password" value="local" />
+        </bean>
+
+</beans>
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dispatcher-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dispatcher-servlet.xml?rev=1095733&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dispatcher-servlet.xml (added)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/dispatcher-servlet.xml Thu Apr 21 14:43:10 2011
@@ -0,0 +1,42 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+    <!-- Scans the classpath of this application for @Components to deploy as beans -->
+    <context:component-scan base-package="org.apache.rave.portal.web.controller"/>
+
+    <!-- Configures the @Controller programming model -->
+    <mvc:annotation-driven/>
+
+    <!-- Forwards requests to the "/" resource to the "home" view -->
+    <mvc:view-controller path="/" view-name="home"/>
+
+    <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory -->
+    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+        <property name="prefix" value="/WEB-INF/views/"/>
+        <property name="suffix" value=".jsp"/>
+    </bean>
+</beans>
+

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml?rev=1095733&r1=1095732&r2=1095733&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml Thu Apr 21 14:43:10 2011
@@ -25,23 +25,31 @@
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
          id="Shindig"
          version="2.5">
-         
-  <display-name>Rave Portal</display-name>
 
-  <!-- Handles all requests into the application -->
-  <servlet>
-    <servlet-name>dispatcher</servlet-name>
-    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-    <init-param>
-      <param-name>contextConfigLocation</param-name>
-      <param-value>/WEB-INF/applicationContext.xml</param-value>
-    </init-param>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
+    <display-name>Rave Portal</display-name>
 
-  <servlet-mapping>
-    <servlet-name>dispatcher</servlet-name>
-    <url-pattern>/</url-pattern>
-  </servlet-mapping>
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>
+            /WEB-INF/dataContext.xml
+            /WEB-INF/applicationContext.xml
+        </param-value>
+    </context-param>
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+     
+
+    <!-- Handles all requests into the application -->
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
 
 </web-app>