You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/08/23 11:46:43 UTC

svn commit: r988048 [2/6] - in /incubator/wookie/trunk: ./ WebContent/WEB-INF/ WebContent/admin/ WebContent/deploy/ WebContent/webmenu/ WebContent/wservices/notsupported/ WebContent/wservices/notsupported/locales/ WebContent/wservices/notsupported/loca...

Modified: incubator/wookie/trunk/WebContent/webmenu/index.jsp
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/webmenu/index.jsp?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/webmenu/index.jsp (original)
+++ incubator/wookie/trunk/WebContent/webmenu/index.jsp Mon Aug 23 09:46:30 2010
@@ -13,10 +13,11 @@
  * limitations under the License.
  */
 --%>
+<%@ page import='org.apache.wookie.helpers.FlashMessage' %>
 <%@ page import='org.apache.wookie.Messages;'%>
 <% Messages localizedMessages = (Messages)session.getAttribute(Messages.class.getName()); %>
 <!DOCTYPE html>
-<% String version = (String)session.getAttribute("version");
+<% String version = (String)request.getAttribute("version");
 // "version" is lazy loaded and will be empty until a request is made to the server
 if (version==null){
 	version="";
@@ -48,8 +49,8 @@ if (version==null){
      
     <div id="content">    
 	
-	<% String errors = (String)session.getAttribute("error_value");%>
-	<% String messages = (String)session.getAttribute("message_value");%>
+	<% String errors = FlashMessage.getErrors(session, request);%>
+	<% String messages = FlashMessage.getMessages(session, request);%>
 	<%if(errors!=null){%>
       <p><img src="../shared/images/cancel.gif" width="16" height="16"><font color=red> <%=errors%> </font> </p>
 	<%}%>
@@ -144,6 +145,4 @@ if (version==null){
 
 </body>
 </html>
-<% session.setAttribute("error_value", null); %>
-<% session.setAttribute("message_value", null);%>
-
+<% FlashMessage.clearErrorsAndMessages(session);%>

Modified: incubator/wookie/trunk/WebContent/webmenu/instantiate.jsp
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/webmenu/instantiate.jsp?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/webmenu/instantiate.jsp (original)
+++ incubator/wookie/trunk/WebContent/webmenu/instantiate.jsp Mon Aug 23 09:46:30 2010
@@ -13,9 +13,9 @@
  * limitations under the License.
  */
 --%>
-<%@ page import='org.apache.wookie.Messages,org.apache.wookie.beans.Widget' %>
+<%@ page import='org.apache.wookie.Messages,org.apache.wookie.beans.IWidget' %>
 <% Messages localizedMessages = (Messages)session.getAttribute(Messages.class.getName()); %>
-<% Widget[] widgets = (Widget[])session.getAttribute("widgets"); %>
+<% IWidget[] widgets = (IWidget[])request.getAttribute("widgets"); %>
 <!DOCTYPE html>
 <html>
 <head>
@@ -122,7 +122,7 @@
 				    		
 								  <select class="ui-widget input ui-state-default ui-corner-all" name="widgetid"  id="widgetid">
 								  <% 
-								  for (Widget widget : widgets){ 
+								  for (IWidget widget : widgets){ 
 									  if(!widget.getGuid().equalsIgnoreCase("http://notsupported")){
 								  %>
 								  <option value="<%=widget.getGuid()%>"><%=widget.getWidgetTitle()%></option>
@@ -168,4 +168,4 @@
 	<div style="text-align:right"><a class="menulink" href="index.jsp"><%=localizedMessages.getString("webmenu.instantiate.menu")%>&nbsp;<img border="0" src="../shared/images/book.gif"></a>&nbsp;</div>
 </div>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: incubator/wookie/trunk/WebContent/webmenu/listall.jsp
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/webmenu/listall.jsp?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/webmenu/listall.jsp (original)
+++ incubator/wookie/trunk/WebContent/webmenu/listall.jsp Mon Aug 23 09:46:30 2010
@@ -13,7 +13,8 @@
  * limitations under the License.
  */
 --%>
-<%@ page import='org.apache.wookie.Messages,org.apache.wookie.beans.Widget,org.apache.wookie.beans.WidgetType,java.util.ArrayList,java.util.Set,java.util.Enumeration,java.util.Hashtable;' %>
+<%@ page import='org.apache.wookie.helpers.FlashMessage' %>
+<%@ page import='org.apache.wookie.Messages,org.apache.wookie.beans.IWidget,java.util.ArrayList,java.util.Enumeration,java.util.Hashtable;' %>
 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
 <% Messages localizedMessages = (Messages)session.getAttribute(Messages.class.getName()); %>
 <!DOCTYPE html>
@@ -47,12 +48,12 @@
 	<table align="center">	
 	<tr align="center">
 	<%	
-	Hashtable widgetsHash = (Hashtable)session.getAttribute("widgetsHash");
+	Hashtable widgetsHash = (Hashtable)request.getAttribute("widgetsHash");
 	ArrayList<String> guids = new ArrayList<String>();
 	int count = -1;
 	for(Enumeration e = widgetsHash.keys(); e.hasMoreElements();){				
 		String id = (String) e.nextElement();
-		Widget widget = (Widget) widgetsHash.get(id);
+		IWidget widget = (IWidget) widgetsHash.get(id);
 		if (!widget.getGuid().equalsIgnoreCase("http://www.tencompetence.org/widgets/default/notsupported")){
 			String guid = widget.getGuid();
 			if(!guids.contains(guid)){
@@ -89,6 +90,4 @@
 </div>
 </body>
 </html>
-<% session.setAttribute("error_value", null); %>
-<% session.setAttribute("message_value", null);%>
-
+<% FlashMessage.clearErrorsAndMessages(session);%>

Modified: incubator/wookie/trunk/WebContent/webmenu/requestapikey.jsp
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/webmenu/requestapikey.jsp?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/webmenu/requestapikey.jsp (original)
+++ incubator/wookie/trunk/WebContent/webmenu/requestapikey.jsp Mon Aug 23 09:46:30 2010
@@ -13,10 +13,11 @@
  * limitations under the License.
  */
 --%>
+<%@ page import='org.apache.wookie.helpers.FlashMessage' %>
 <%@ page import='org.apache.wookie.Messages' %>
 <% Messages localizedMessages = (Messages)session.getAttribute(Messages.class.getName()); %>
 <!DOCTYPE html>
-<% String version = (String)session.getAttribute("version");
+<% String version = (String)request.getAttribute("version");
 // "version" is lazy loaded and will be empty until a request is made to the server
 if (version==null){
 	version="";
@@ -101,8 +102,8 @@ if (version==null){
      
     <div id="content">    
 	
-	<% String errors = (String)session.getAttribute("error_value");%>
-	<% String messages = (String)session.getAttribute("message_value");%>
+	<% String errors = FlashMessage.getErrors(session, request);%>
+	<% String messages = FlashMessage.getMessages(session, request);%>
 	<%if(errors!=null){%>
       <p><img src="../shared/images/cancel.gif" width="16" height="16"><font color=red> <%=errors%> </font> </p>
 	<%}%>
@@ -142,4 +143,4 @@ if (version==null){
 </div>
 <div id="confirm" style="display:none;" title="<%=localizedMessages.getString("webmenu.requestapikey.8")%>"><span class="ui-icon ui-icon-alert" style="float:left;"></span><%=localizedMessages.getString("webmenu.requestapikey.5")%></div>
 </body>
-</html>
\ No newline at end of file
+</html>

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported:948461-988031*
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/index.htm
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/index.htm:948461-988031
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/index.htm:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales:948461-988031*
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/bu/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales/bu:948461-988031*
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales/bu:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/bu/index.htm
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales/bu/index.htm:948461-988031
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales/bu/index.htm:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/en/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales/en:948461-988031*
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales/en:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/en/index.htm
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales/en/index.htm:948461-988031
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales/en/index.htm:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/fr/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales/fr:948461-988031*
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales/fr:827972-831908

Propchange: incubator/wookie/trunk/WebContent/wservices/notsupported/locales/fr/index.htm
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/WebContent/wservices/notsupported/locales/fr/index.htm:948461-988031
+/incubator/wookie/branches/standalone/WebContent/wservices/notsupported/locales/fr/index.htm:827972-831908

Modified: incubator/wookie/trunk/ant/ivy-java-common.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivy-java-common.xml?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivy-java-common.xml (original)
+++ incubator/wookie/trunk/ant/ivy-java-common.xml Mon Aug 23 09:46:30 2010
@@ -25,15 +25,18 @@
 	<property name="project.test.src.dir" location="src-tests" />
 
 	<property name="project.build.classes.dir" location="${project.build.dir}/classes" />
+	<property name="project.build.classes.test.dir" location="${project.build.dir}/classes-test" />
 
 	<property name="compile.debug" value="on" />
 	<property name="jvmargs" value="" />
+	<property name="compilerargs" value="" />
+	<property name="jdbc.driver.path" value="" />
 	
 	<property name="dist.dir" location="dist"/>
 	
     <property name="java.source.version" value="1.5"/>
 	<property name="java.target.version" value="1.5"/>
-	
+
 	<target name="init">
     	<available file="${project.core.src.dir}" property="project.core.src.dir.exists"/>
     	<available file="${project.test.src.dir}" property="project.test.src.dir.exists"/>
@@ -43,30 +46,38 @@
 	    <path id="run.path.id">
 	        <path refid="project.core.class.path" />
 	        <path location="${project.build.classes.dir}" />
+	        <path location="${jdbc.driver.path}" />
 	    </path>
+
+        <propertyset id="run.syspropertyset.id">
+            <propertyref prefix="${ant.project.name}."/>
+        </propertyset>
 	</target>
     
     <target name="compile-test" 
     	depends="compile-core" description="--> compile the project tests"
     	if="project.test.src.dir.exists">
     	<echo>Compiling test files in ${project.test.src.dir}</echo>
-        <mkdir dir="${project.build.classes.dir}" />
+        <mkdir dir="${project.build.classes.test.dir}" />
 		<javac source="${java.source.version}" 
 			target="${java.target.version}" 
-		    destdir="${project.build.classes.dir}" 
-			debug="${compile.debug}" 
-			classpathref="project.test.class.path">
+		    destdir="${project.build.classes.test.dir}" 
+			debug="${compile.debug}">
 			<src path="${project.test.src.dir}" />
+	        <classpath>
+	            <path refid="project.test.class.path" />
+	            <path location="${project.build.classes.dir}" />
+	        </classpath>
 		</javac>
 		
 		<echo>Copying resources from test source directory</echo>
-		<copy todir="${project.build.classes.dir}">
+		<copy todir="${project.build.classes.test.dir}">
 			<fileset dir="${project.test.src.dir}">
 				<exclude name="**.java" />
 			</fileset>
 		</copy>
 		
-    	<antcall target="post-compile-test"/>
+    	<antcall target="post-compile-test" inheritRefs="true"/>
     </target>
     
 	<target name="post-compile-test" description="Run after compile-test. Intended to be overridden if your project needs any post compile processing"/>
@@ -79,7 +90,7 @@
     	depends="local-publish-subprojects, resolve, init" description="--> compile the project"
     	if="project.core.src.dir.exists">
     	<echo>Preparing to compile core of ${ant.project.name}-${version}.</echo>
-    	<antcall target="pre-compile-core"/>
+    	<antcall target="pre-compile-core" inheritRefs="true"/>
     	
     	<echo>Compiling files in ${project.core.src.dir}</echo>
     	<echo>Build directory is ${project.build.classes.dir}</echo>
@@ -93,6 +104,7 @@
 			debug="${compile.debug}" 
 			classpathref="project.core.class.path">
 			<src path="${project.core.src.dir}" />
+            <compilerarg line="${compilerargs}" />
 		</javac>
     	
 		<echo>Copying resources from source directory</echo>
@@ -102,7 +114,7 @@
 			</fileset>
 		</copy>
 		
-    	<antcall target="post-compile-core"/>
+    	<antcall target="post-compile-core" inheritRefs="true"/>
     </target>
     
 
@@ -116,6 +128,7 @@
             failonerror="true">
             <jvmarg line="${jvmargs}"/>
         	<arg line="${run.args}"/>
+            <syspropertyset refid="run.syspropertyset.id"/>
         </java>    	
     </target>
 	
@@ -126,7 +139,8 @@
 	        failonerror="true">
 	        <jvmarg line="${jvmargs}"/>
 	        <arg line="${run.args}"/>
-	       </java>    	    	
+            <syspropertyset refid="run.syspropertyset.id"/>
+	    </java>    	    	
 	</target>	
     
     <target name="jar" depends="clean-dist, compile-core" description="--> make a jar file for this project">
@@ -151,14 +165,14 @@
     	<tstamp>
 			<format property="now" pattern="yyyyMMddHHmmss"/>
 		</tstamp>
-    	<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${dist.dir}/wookie.pom"/>
+    	<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${dist.dir}/${ant.project.name}.pom"/>
     	<ivy:publish resolver="local"
     		pubrevision="${version}"
     		forcedeliver="true"
     		srcivypattern="${dist.dir}/ivy.xml"
 			pubdate="${now}"
     		overwrite="true">
-    		<artifact name="wookie" type="pom" ext="pom"/>
+    		<artifact name="${ant.project.name}" type="pom" ext="pom"/>
     		<artifacts pattern="${dist.dir}/${ant.project.name}-${version}.jar"/>
     	</ivy:publish>
         <echo message="project ${ant.project.name} published locally with version ${version}" />

Modified: incubator/wookie/trunk/ant/ivy-webapp-common.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivy-webapp-common.xml?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivy-webapp-common.xml (original)
+++ incubator/wookie/trunk/ant/ivy-webapp-common.xml Mon Aug 23 09:46:30 2010
@@ -36,7 +36,7 @@
 		</copy>
 		<ivy:retrieve conf="deploy" pattern="${servletEngine.webapp.dir}/${ant.project.name}/WEB-INF/lib/[artifact]-[revision].[ext]"/>
 		
-		<antcall target="post-deploy-webapp" />
+		<antcall target="post-deploy-webapp" inheritRefs="true"/>
 	</target>
 
 	<target name="post-deploy-webapp" />

Modified: incubator/wookie/trunk/build.properties
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/build.properties?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/build.properties (original)
+++ incubator/wookie/trunk/build.properties Mon Aug 23 09:46:30 2010
@@ -1,19 +1,47 @@
 version=0.8.1-SNAPSHOT
 
-# Only one of the following should be set.
-# If you choose derby you need to do no addiitonal configuration, if you choose mySQL
-project.using.derby=true
-#project.using.mysql=true
-
 # Widgets to deploy
 # This is an ant include file that will filter the directories in the widgets src folder
 # any widgets that match this filter will be deployed at runtime in the standalone server 
-widget.deploy.dir=build/webapp/wookie/deploy
 widget.deploy.include=*/build.xml
 
-# The location of your servlets webapp directory (defaults to location for standalone server)
+# The location of the wookie deployment directory, (required: defaults to location for
+# standalone server)
+widget.deploy.dir=build/webapp/wookie/deploy
+
+# The location of your servlets webapp directory, (required: defaults to location for
+# standalone server)
 servletEngine.webapp.dir=build/webapp
 
+# The location of your container lib directory, (required for deployed non-standalone
+# configurations)
+#servletEngine.container.lib.dir=
+
+# The location of your tomcat container webapp context configuration directory, (required
+# for deployed non-standalone configurations; requires configuration of wookie.db.user,
+# wookie.db.password, wookie.db.driver, wookie.db.uri, and jdbc.driver.path properties below
+# for JPA JDBC configurations)
+#servletEngine.context.conf.dir=
+
+# Generic JPA JDBC server configuration; supported database types: db2, derby, hsqldb, mssql,
+# mysql, mysql5, oracle, oracle9, oracle10, postgresql, and sybase; (all properties required
+# for deployed non-standalone configurations)
+#wookie.persistence.manager.type=jpa
+#wookie.db.user=java
+#wookie.db.password=java
+#wookie.db.driver=com.mysql.jdbc.Driver
+#wookie.db.uri=jdbc:mysql://localhost:3306/widgetdb
+#wookie.db.type=mysql
+#jdbc.driver.path=../mysql-connector-java-5.1.7.jar
+
+# Embedded Jackrabbit JCR server configuration, (all properties required for deployed
+# non-standalone configurations)
+#wookie.persistence.manager.type=jcr
+#wookie.repository.user=java
+#wookie.repository.password=java
+#wookie.repository.rootpath=/wookie
+#wookie.repository.workspace=default
+
 ################################################################################
 ################################################################################
 # In most cases you will not not to change the settings below this line
@@ -25,21 +53,20 @@ servletEngine.webapp.dir=build/webapp
 build.dir=build
 ivy.repository.dir=ant
 
-#Wookie connector framework properties
+# Wookie connector framework properties
 wookie.connector.dir=connector
 
-#Wookie W3c Parser propertis
+# Wookie W3c Parser properties
 wookie.parser.w3c.dir=parser
 
-#widget handling properties
+# Widget handling properties
 wookie.widgets.dir=widgets
 widget.deploy.exclude=widget-template/build.xml
 
-#feature handling properties
+# Feature handling properties
 wookie.features.dir=features
 
-#standalone server configuration
+# Standalone server configuration
 main.start.class.name=org.apache.wookie.server.Start
-main.stop.class.name=org.apache.wookie.server.Stop
 jvmargs=
-run.args="port=8080"
+run.args="port=8080"
\ No newline at end of file

Modified: incubator/wookie/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/build.xml?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/build.xml (original)
+++ incubator/wookie/trunk/build.xml Mon Aug 23 09:46:30 2010
@@ -15,7 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project default="compile-core" basedir="." name="wookie">
+<project default="compile-core" basedir="." name="wookie" xmlns:ivy="antlib:org.apache.ivy.ant">
   <description>
     Ivy based build system for Apache Wookie.
   </description>
@@ -23,23 +23,35 @@
   <property file="local.build.properties"/> 
   <property file="build.properties"/>
   <property name="db.name" value="widgetDB" />
-	
+
+  <property name="etc.dir" location="etc" />
+
+  <!-- JPA annotation processor -->
+  <property name="java.source.version" value="1.6"/>
+  <property name="java.target.version" value="1.6"/>
+  <property name="compilerargs" value="-Aopenjpa.metamodel=true" />
+
   <import file="ant/ivy-webapp-common.xml"/>
   <property file="${project.core.src.dir}/widgetserver.properties"/>
-	
- <target name="set-mysql-script-dir" if="project.using.mysql">
- 	<property name="project.scripts.dir" value="scripts/mysql"/>
- </target>
-	
-  <target name="set-derby-script-dir" if="project.using.derby">
-	 	<property name="project.scripts.dir" value="scripts/derby"/>
-  </target>
+  <property name="servletEngine.repository.dir" location="${servletEngine.webapp.dir}/../repository"/>
 	
   <target name="run" depends="deploy-webapp" description="Run in standalone mode">    
   	<ant antfile="ant/ivy-java-common.xml" target="run"/>
   </target>
 
   <target name="post-deploy-webapp">  
+    <!-- configure web.xml -->
+    <condition property="deploy.webapp.jpa" value="true">
+      <or>
+        <equals arg1="${wookie.persistence.manager.type}" arg2="jpa"/>
+        <not><isset property="wookie.persistence.manager.type"/></not>
+      </or>
+    </condition>
+    <condition property="deploy.webapp.jcr" value="true">
+      <equals arg1="${wookie.persistence.manager.type}" arg2="jcr"/>
+    </condition>
+	<antcall target="post-deploy-webapp-jpa"/>    
+	<antcall target="post-deploy-webapp-jcr"/>    
   	<!-- deploy widgets -->
   	<delete dir="${widget.build.dir}"/>
   	<subant antfile="build.xml" target="deploy-widget" inheritall="true">
@@ -57,7 +69,117 @@
   	  </fileset>
   	</subant>
   </target>
+
+  <target name="post-deploy-webapp-jpa" if="deploy.webapp.jpa">
+    <!-- configure JPA web.xml resource ref -->
+	<copy file="${project.webapp.dir}/WEB-INF/web.xml"
+          todir="${servletEngine.webapp.dir}/${ant.project.name}/WEB-INF"
+          overwrite="true">
+      <filterset>
+        <filter token="RESOURCE_REF_DESCRIPTION" value="The JPA database connection."/>
+        <filter token="RESOURCE_REF_NAME" value="jdbc/widgetdb"/>
+        <filter token="RESOURCE_REF_TYPE" value="javax.sql.DataSource"/>
+      </filterset>
+	</copy>
+    <!-- configure JPA widgetserver.properties settings -->
+    <condition property="widgetserver.db.type" value="${wookie.db.type}" else="">
+      <isset property="wookie.db.type"/>
+    </condition>
+	<copy file="${project.build.classes.dir}/widgetserver.properties"
+          todir="${servletEngine.webapp.dir}/${ant.project.name}/WEB-INF/classes"
+          overwrite="true">
+      <filterset>
+        <filter token="PERSISTENCE_MANAGER_CLASSNAME" value="org.apache.wookie.beans.jpa.JPAPersistenceManager"/>
+        <filter token="DATABASE_TYPE" value="${widgetserver.db.type}"/>
+        <filter token="REPOSITORY_USER" value=""/>
+        <filter token="REPOSITORY_PASSWORD" value=""/>
+        <filter token="REPOSITORY_ROOTPATH" value=""/>
+        <filter token="REPOSITORY_WORKSPACE" value=""/>
+      </filterset>
+	</copy>
+    <!-- deploy container libraries -->
+    <condition property="deploy.webapp.container.lib" value="true">
+      <and>
+        <isset property="servletEngine.container.lib.dir"/>
+        <isset property="jdbc.driver.path"/>
+      </and>
+    </condition>
+	<antcall target="post-deploy-webapp-jdbc-driver"/>    
+    <!-- deploy tomcat webapp context configuration -->
+	<antcall target="post-deploy-webapp-context-conf-jpa"/>    
+  </target>
+  
+  <target name="post-deploy-webapp-jdbc-driver" if="deploy.webapp.container.lib">
+    <copy file="${jdbc.driver.path}" todir="${servletEngine.container.lib.dir}"/>
+  </target>
+
+  <target name="post-deploy-webapp-context-conf-jpa" if="servletEngine.context.conf.dir">
+    <!-- configure JPA context.xml configuration -->
+    <copy file="${etc.dir}/tomcat/conf/jpa-context.xml"
+          tofile="${servletEngine.context.conf.dir}/${ant.project.name}.xml"
+          overwrite="true">
+      <filterset>
+        <filter token="DATABASE_USER" value="${wookie.db.user}"/>
+        <filter token="DATABASE_PASSWORD" value="${wookie.db.password}"/>
+        <filter token="DATABASE_DRIVER" value="${wookie.db.driver}"/>
+        <filter token="DATABASE_URI" value="${wookie.db.uri}"/>
+      </filterset>
+    </copy>
+  </target>
+
+  <target name="post-deploy-webapp-jcr" if="deploy.webapp.jcr">
+    <!-- configure JCR web.xml resource ref -->
+	<copy file="${project.webapp.dir}/WEB-INF/web.xml"
+          todir="${servletEngine.webapp.dir}/${ant.project.name}/WEB-INF"
+          overwrite="true">
+      <filterset>
+        <filter token="RESOURCE_REF_DESCRIPTION" value="The JCR repository."/>
+        <filter token="RESOURCE_REF_NAME" value="jcr/widgetrepo"/>
+        <filter token="RESOURCE_REF_TYPE" value="javax.jcr.Repository"/>
+      </filterset>
+	</copy>
+    <!-- configure JCR widgetserver.properties settings -->
+    <condition property="widgetserver.repository.user" value="${wookie.repository.user}" else="">
+      <isset property="wookie.repository.user"/>
+    </condition>
+    <condition property="widgetserver.repository.password" value="${wookie.repository.password}" else="">
+      <isset property="wookie.repository.password"/>
+    </condition>
+    <condition property="widgetserver.repository.rootpath" value="${wookie.repository.rootpath}" else="">
+      <isset property="wookie.repository.rootpath"/>
+    </condition>
+    <condition property="widgetserver.repository.workspace" value="${wookie.repository.workspace}" else="">
+      <isset property="wookie.repository.workspace"/>
+    </condition>
+	<copy file="${project.build.classes.dir}/widgetserver.properties"
+          todir="${servletEngine.webapp.dir}/${ant.project.name}/WEB-INF/classes"
+          overwrite="true">
+      <filterset>
+        <filter token="PERSISTENCE_MANAGER_CLASSNAME" value="org.apache.wookie.beans.jcr.JCRPersistenceManager"/>
+        <filter token="DATABASE_TYPE" value=""/>
+        <filter token="REPOSITORY_USER" value="${widgetserver.repository.user}"/>
+        <filter token="REPOSITORY_PASSWORD" value="${widgetserver.repository.password}"/>
+        <filter token="REPOSITORY_ROOTPATH" value="${widgetserver.repository.rootpath}"/>
+        <filter token="REPOSITORY_WORKSPACE" value="${widgetserver.repository.workspace}"/>
+      </filterset>
+	</copy>
+    <!-- deploy tomcat webapp context configuration -->
+	<antcall target="post-deploy-webapp-context-conf-jcr"/>
+  </target>
 	
+  <target name="post-deploy-webapp-context-conf-jcr" if="servletEngine.context.conf.dir">
+    <mkdir dir="${servletEngine.repository.dir}"/>
+    <copy file="${etc.dir}/tomcat/conf/repository.xml"
+          tofile="${servletEngine.repository.dir}/repository.xml"/>
+    <copy file="${etc.dir}/tomcat/conf/jcr-context.xml"
+          tofile="${servletEngine.context.conf.dir}/${ant.project.name}.xml"
+          overwrite="true">
+      <filterset>
+        <filter token="REPOSITORY_DIR" value="${servletEngine.repository.dir}"/>
+      </filterset>
+    </copy>
+  </target>
+
   <target name="deploy-widget">
   	<property name="deployToDev" value="true"/>
   	<input message="What is the short name of the widget you wish to deploy?" 
@@ -78,35 +200,98 @@
   	<ant dir="${wookie.parser.w3c.dir}/java" target="publish-local" inheritAll="false"/>
   </target>
   	
-  <target name="post-compile-core" depends="set-mysql-script-dir, set-derby-script-dir">
+  <target name="pre-compile-core">
+    <!-- build supported database schema scripts -->
+    <ivy:cachepath pathid="project.ddlutils.class.path" conf="ddlutils" />
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="db2" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="derby" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="hsqldb" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="mssql" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="mysql" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="mysql5" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="oracle" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="oracle9" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="oracle10" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="postgresql" />
+    </antcall>
+    <antcall target="build-database-schema" inheritRefs="true">
+      <param name="databasetype" value="sybase" />
+    </antcall>
+  </target>
+
+  <target name="build-database-schema">
+    <!-- build specified database schema script -->
+    <taskdef classname="org.apache.ddlutils.task.DdlToDatabaseTask" name="ddlToDatabase"
+             classpathref="project.ddlutils.class.path" />
+    <mkdir dir="${project.build.classes.dir}/org/apache/wookie/beans/jpa" />
+    <ddlToDatabase usedelimitedsqlidentifiers="false"
+                   databasetype="${databasetype}"
+                   schemafile="${etc.dir}/ddl-schema/wookie-schema.xml">
+      <writeSchemaSqlToFile outputfile="${project.build.classes.dir}/org/apache/wookie/beans/jpa/${databasetype}-wookie-schema.sql"
+                            dodrops="true"
+                            alterdatabase="false"
+                            failonerror="true" />
+    </ddlToDatabase>
+  </target>
+
+  <target name="post-compile-core">
+    <!-- JPA enhancement -->
+	<path id="project.openjpa.class.path">
+	  <path refid="project.core.class.path" />
+	  <path location="${project.build.classes.dir}" />
+	</path>
+    <taskdef name="openJPAEnhancer" classname="org.apache.openjpa.ant.PCEnhancerTask"
+             classpathref="project.openjpa.class.path" />
+    <openJPAEnhancer directory="${project.build.classes.dir}/org/apache/wookie/beans/jpa/impl"
+                     addDefaultConstructor="true" enforcePropertyRestrictions="true">
+      <config propertiesFile="${project.build.classes.dir}/META-INF/persistence.xml" />
+      <classpath>
+        <path refid="project.openjpa.class.path" />
+      </classpath>
+    </openJPAEnhancer>
+    
   	<!-- compile features -->
   	<subant antfile="build.xml" target="build-feature" inheritall="true">
   	  <fileset dir="${wookie.features.dir}">
   	  	<include name="${widget.deploy.include}"/>
   	  </fileset>
-  	</subant>  	
-  	
-  	<!-- copy database resources -->
-  	<copy file="${project.scripts.dir}/widgetdb.sql" tofile="${project.build.classes.dir}/widgetdb.sql"/>
-  	<copy file="${project.scripts.dir}/hibernate.cfg.xml" tofile="${project.build.classes.dir}/hibernate.cfg.xml"/>
-  </target>
-	
-  <target name="clean-mysql" if="project.using.mysql">
-  	<echo>Deleting mysql database</echo>
-  	<sql 
-	   	classpath="${servletEngine.webapp.dir}/${ant.project.name}/WEB-INF/lib/mysql-connector-java-5.1.6.jar"
-	   	driver="com.mysql.jdbc.Driver" 
-	   	url="jdbc:mysql://localhost:3306/?autoReconnect=true" 
-	   	userid="java" password="java" >
-	      <transaction src="${project.scripts.dir}/widgetdb.sql"/>
-	</sql>
-  </target>
-	
-  <target name="clean-derby" if="project.using.derby">
-  	<echo>Deleting derby database files</echo>
-  	<delete dir="${db.name}"/>
+  	</subant>
   </target>
 	
-  <target name="clean-db" depends="set-mysql-script-dir, set-derby-script-dir, clean-mysql, clean-derby" description="delete the Wookie database, it will be recreated next time the application is run">
+  <target name="post-compile-test">
+    <!-- run unit tests, (skip functional and integration tests) -->
+    <junit printsummary="true" haltonfailure="true">
+      <formatter type="brief" usefile="false"/>
+      <classpath>
+	    <path location="${project.build.classes.test.dir}" />
+	    <path location="${project.build.classes.dir}" />
+	    <path refid="project.test.class.path" />
+      </classpath>
+      <batchtest>
+        <fileset dir="${project.build.classes.test.dir}"
+                 includes="**/*Test.class"
+                 excludes="**/Abstract*Test.class,**/functional/*Test.class,**/integration/*Test.class" />
+      </batchtest>
+    </junit>
   </target>
-</project>
\ No newline at end of file
+
+</project>

Propchange: incubator/wookie/trunk/features/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features:948461-988031*
+/incubator/wookie/branches/standalone/features:827972-831908

Propchange: incubator/wookie/trunk/features/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/build.xml:948461-988031
+/incubator/wookie/branches/standalone/features/build.xml:827972-831908

Propchange: incubator/wookie/trunk/features/camera/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera:948461-988031*
+/incubator/wookie/branches/standalone/features/camera:827972-831908

Propchange: incubator/wookie/trunk/features/camera/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/build.xml:948461-988031
+/incubator/wookie/branches/standalone/features/camera/build.xml:827972-831908

Propchange: incubator/wookie/trunk/features/camera/licenses.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/licenses.txt:948461-988031
+/incubator/wookie/branches/standalone/features/camera/licenses.txt:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/shared:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/bondi_camera.js
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/bondi_camera.js:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/bondi_camera.js:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/camcanvas.html
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/camcanvas.html:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/camcanvas.html:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/camcanvas.swf
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/camcanvas.swf:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/camcanvas.swf:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/jquery.js
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/jquery.js:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/jquery.js:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/loadingAnimation.gif
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/loadingAnimation.gif:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/loadingAnimation.gif:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/snap.png
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/snap.png:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/snap.png:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/thickbox.css
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/thickbox.css:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/thickbox.css:827972-831908

Propchange: incubator/wookie/trunk/features/camera/shared/thickbox.js
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/shared/thickbox.js:948461-988031
+/incubator/wookie/branches/standalone/features/camera/shared/thickbox.js:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src/org:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/apache/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org/apache:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src/org/apache:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/apache/wookie/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org/apache/wookie:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src/org/apache/wookie:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/apache/wookie/feature/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org/apache/wookie/feature:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src/org/apache/wookie/feature:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/apache/wookie/feature/bondi/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org/apache/wookie/feature/bondi:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src/org/apache/wookie/feature/bondi:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/apache/wookie/feature/bondi/camera/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org/apache/wookie/feature/bondi/camera:948461-988031*
+/incubator/wookie/branches/standalone/features/camera/src/org/apache/wookie/feature/bondi/camera:827972-831908

Propchange: incubator/wookie/trunk/features/camera/src/org/apache/wookie/feature/bondi/camera/CameraFeature.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/features/camera/src/org/apache/wookie/feature/bondi/camera/CameraFeature.java:948461-988031
+/incubator/wookie/branches/standalone/features/camera/src/org/apache/wookie/feature/bondi/camera/CameraFeature.java:827972-831908

Modified: incubator/wookie/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/ivy.xml?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/ivy.xml (original)
+++ incubator/wookie/trunk/ivy.xml Mon Aug 23 09:46:30 2010
@@ -21,6 +21,7 @@
       <conf name="deploy" description="Provide the necessary files and libraries to deploy in a production environment"/>
 	  <conf name="dev" extends="deploy" description="Provide the necessary files and libraries to run in standalone (development) mode"/>
 	  <conf name="test" extends="dev" visibility="private" description="for our testing frameowrk"/>
+	  <conf name="ddlutils" visibility="private" description="Provide the necessary libraries to invoke DDLUtils schema generation"/>
 	</configurations>
     
     <dependencies>
@@ -68,34 +69,51 @@
         </dependency>
         <dependency org="org.json" name="json" rev="20080701" conf="deploy->default">
         </dependency>
-        <dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="deploy->default">
+        <dependency org="org.apache.openjpa" name="openjpa-all" rev="2.0.0" conf="deploy->default">
         </dependency>
-        
+        <dependency org="commons-pool" name="commons-pool" rev="1.3" conf="deploy->default">
+		</dependency>        
+        <dependency org="javax.jcr" name="jcr" rev="1.0" conf="deploy->default">
+        </dependency>
+        <dependency org="org.apache.jackrabbit" name="jackrabbit-core" rev="1.5.3" conf="deploy->default">
+        </dependency>
+        <dependency org="org.apache.jackrabbit" name="jackrabbit-jcr-commons" rev="1.5.3" conf="deploy->default">
+        </dependency>
+        <dependency org="org.apache.jackrabbit" name="jackrabbit-ocm" rev="1.5.3" conf="deploy->default">
+        </dependency>
+
         <!-- Libraries used in a development/test environment but not in deployment -->
+        <dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="dev->default">
+        </dependency>
         <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.3" conf="dev->default">
         </dependency>
         <dependency org="org.mortbay.jetty" name="jetty-util" rev="6.1.3" conf="dev->default">
         </dependency>
+        <dependency org="org.mortbay.jetty" name="jetty-plus" rev="6.1.3" conf="dev->default">
+        </dependency>
+        <dependency org="org.mortbay.jetty" name="jetty-naming" rev="6.1.3" conf="dev->default">
+        </dependency>
         <dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.3" conf="dev->default">
         </dependency>
         <dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="6.1.3" conf="dev->default">
         </dependency>
-       <!--<dependency org="org.mortbay.jetty" name="servlet-api-2.5" rev="6.1.3" conf="dev->default">
-        </dependency>-->
+        <dependency org="c3p0" name="c3p0" rev="0.9.1.2" conf="dev->default">
+		</dependency>
         <dependency org="org.apache.derby" name="derby" rev="10.4.2.0" conf="dev->default">
 		</dependency>
 		
 		<!-- Libraries used in testing -->
         <dependency org="junit" name="junit" rev="4.7" conf="test->default">
         </dependency>
+        <dependency org="directory-naming" name="naming-java" rev="0.8" conf="test->default">
+		</dependency>
+        <dependency org="commons-dbcp" name="commons-dbcp" rev="1.2.2" conf="test->default">
+		</dependency>
         
-        
-        <!-- Libraries with incompatible open source licences -->
-        <dependency org="org.hibernate" name="hibernate-c3p0" rev="3.3.1.GA" conf="deploy->default">
-        </dependency>
-        <dependency org="org.hibernate" name="hibernate-core" rev="3.3.1.GA" conf="deploy->default,optional">
+		<!-- DDLUtils Library -->
+        <dependency org="org.apache.ddlutils" name="ddlutils" rev="1.0" conf="ddlutils->default">
         </dependency>
-        <dependency org="mysql" name="mysql-connector-java" rev="5.1.6" conf="deploy->default">
+        <dependency org="log4j" name="log4j" rev="1.2.14" conf="ddlutils->default">
         </dependency>
         
         <exclude module="juel-api"/>

Modified: incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/LocalizationUtils.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/LocalizationUtils.java?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/LocalizationUtils.java (original)
+++ incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/util/LocalizationUtils.java Mon Aug 23 09:46:30 2010
@@ -15,6 +15,7 @@ package org.apache.wookie.w3c.util;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Comparator;
 import java.util.List;
 
@@ -36,8 +37,8 @@ public class LocalizationUtils {
 	/**
 	 * Returns the first (best) match for an element given the set of locales, or null
 	 * if there are no suitable elements.
-	 * @param locales
 	 * @param elements
+	 * @param locales
 	 * @return an ILocalizedElement, or null if there are no valid entries
 	 */
 	public static ILocalizedElement getLocalizedElement(ILocalizedElement[] elements,String[] locales){
@@ -52,6 +53,7 @@ public class LocalizationUtils {
 	 * are returned unless no appropriate localized elements are found, in which case nonlocalized elements
 	 * are returned
 	 * 
+	 * @param elements
 	 * @param locales
 	 * @return the sorted and filtered set of elements
 	 */

Modified: incubator/wookie/trunk/readme.txt
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/readme.txt?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/readme.txt (original)
+++ incubator/wookie/trunk/readme.txt Mon Aug 23 09:46:30 2010
@@ -31,8 +31,8 @@ This will downloaded the latest source c
 
 You then need to enter:
 
-cd PROJECT_HOME_DIRECTORY
-ant
+> cd PROJECT_HOME_DIRECTORY
+> ant
 
 The first time you run this command all dependencies will be downloaded so you must be online and 
 it will take some time. Subsequent builds will be much faster.
@@ -42,11 +42,13 @@ You can run Wookie in a number of differ
 Running Wookie in "standalone" mode
 ===================================
 The quickest way to run Wookie is in "standalone" mode; in this mode Wookie uses a local database 
-and embedded server. This is a good way to experiment with Wookie in development.
+and embedded server. This is a good way to experiment with Wookie in development. Note that by
+default the database is cleared and initialized on every launch.
 
 To run Wookie in standalone mode:
 
-ant run
+> cd PROJECT_HOME_DIRECTORY
+> ant run
 
 The first command will download any required libraries for Wookie. The second will start a server 
 running on port 8080. To access it, go to http://localhost:8080/wookie
@@ -56,59 +58,96 @@ To access the administration menu (http:
 
 If you want to start with a completely clean build then use:
 
-ant clean-build run
-
-If you want to clean the database use:
-
-ant clean-db
+> cd PROJECT_HOME_DIRECTORY
+> ant clean-build run
 
 Running Wookie in debug mode
 ============================
 You can start Wookie in debug mode using JDSPA with the following command:
 
-ant -Djvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" run
+> cd PROJECT_HOME_DIRECTORY
+> ant -Djvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" run
 
-Running Wookie with Tomcat and MySQL
-====================================
-The following will compile and run the server in Tomcat with a MySQL database. The database tables will be set up automatically, however you must have previously created a database called "widgetdb" with username "java" and password "java". (If you want to change the database connection settings, then you need to alter the scripts/mysql/hibernate.cfg.xml.)
+Once the server is running connect your debugger to port 8000. If "suspend=y" is used, it will will block, waiting for a debug connection before starting the server.
 
-First, you need to edit the "build.properties" file as follows:
+Running Wookie with Tomcat and an external RDBMS
+================================================
+The following will compile and run the server in Tomcat with a specified RDBMS using JPA persistence. The database schema can be defined and populated on launch, however you must have previously done the following:
 
-uncomment "project.using.mysql=true" and comment out "project.using.derby=true"
-set "servletEngine.webapp.dir=" to the location of your tomcat webapps directory.
+1. Obtained a JDBC driver jar file for the database,
+2. created an empty database for Wookie's persistent storage, and
+3. have valid database credentials to access it.
 
-Next you need to setup the MySQL tables by running:
+Make the following changes to configure build.properties, (substituting CATALINA_HOME with the absolute or relative path to Tomcat's installation directory and specifying the database driver, url, type and credentials connection information):
 
-ant clean-db
+widget.deploy.dir=CATALINA_HOME/webapps/wookie/deploy
+servletEngine.webapp.dir=CATALINA_HOME/webapps
+servletEngine.container.lib.dir=CATALINA_HOME/lib
+servletEngine.context.conf.dir=CATALINA_HOME/conf/Catalina/localhost
+wookie.persistence.manager.type=jpa
+wookie.db.user=java
+wookie.db.password=java
+wookie.db.driver=com.mysql.jdbc.Driver
+wookie.db.uri=jdbc:mysql://localhost:3306/widgetdb
+wookie.db.type=mysql
+jdbc.driver.path=../mysql-connector-java-5.1.7.jar
 
-If you have previously used Wookie in standalone deployment, to ensure the right scripts are included in the build you need to run:
+The wookie.db.type setting can accept the following values: db2, derby, hsqldb, mssql, mysql, mysql5, oracle, oracle9, oracle10, postgresql, and sybase. The jdbc.driver.path setting can be absolute or relative file path to the driver jar archive.
 
-ant clean-build
+To ensure the configuration changes are propagated into the Wookie build artifacts, perform a full clean build after changing build.properties:
 
-Then to build and deploy the webapp, run:
+> cd PROJECT_HOME_DIRECTORY
+> ant clean-build deploy-webapp
 
-ant deploy-webapp
+To force Wookie to define or reset the database schema on the first start, use the following commands to start the Tomcat server:
 
-To access the administration menu (http://localhost:8080/wookie/admin) use the username 'java' and password 'java'.
+> cd PROJECT_HOME_DIRECTORY
+> export CATALINA_OPTS="-Dwidget.persistence.manager.initstore=true"
+> CATALINA_HOME/bin/startup.sh
 
-If you want to start with a completely clean build then use:
+To shutdown the Wookie Tomcat server and clear the initialization flag:
 
-ant clean-build deploy-webapp
+> cd PROJECT_HOME_DIRECTORY
+> CATALINA_HOME/bin/shutdown.sh
+> export CATALINA_OPTS=
 
-If you want to clean the database use:
+There are also SQL scripts for all of the valid database configurations built as part of Wookie that can be used to initialize the database schema manually if desired. These are located here:
 
-ant clean-db
+build/classes/org/apache/wookie/beans/jpa/db2-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/derby-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/hsqldb-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/mssql-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/mysql5-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/mysql-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/oracle10-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/oracle9-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/oracle-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/postgresql-wookie-schema.sql
+build/classes/org/apache/wookie/beans/jpa/sybase-wookie-schema.sql
 
-By default Wookie connects to MySQL using Hibernate and the C3P0 connection pooler.
+The Wookie server will populate the newly initialized database with seed data to complete the process when started.
 
-Once the server is running connect your debugger to port 8000. If "suspend=y" is used, it will will block, waiting for a debug connection before starting the server.
+Running Wookie using embedded Jackrabbit JCR
+============================================
+The folloing property is used to switch the standalone or Tomcat deployed servers to utilize JCR for persistence via an embedded JCR instance:
+
+wookie.persistence.manager.type=jcr
+
+Additional properties must be configured to specify the desired JCR root node path and credentials for tomcat deployments:
+
+wookie.repository.user=java
+wookie.repository.password=java
+wookie.repository.rootpath=/wookie
+wookie.repository.workspace=default
+
+These replace the wookie.db.* and jdbc.drive.path settings above, but otherwise the instructions apply for the JCR configuration.
 
 Running Wookie with other configurations
 ========================================
-Other configurations of Wookie can also be run; the main requirements are a servlet container and a database. The setup information for databases can be found in the /scripts directory. How these are loaded into configurations is defined in build.xml; the main requirement is to define connection details in scripts/database/hibernate.cfg.xml and to define the database setup script in scripts/database/widgetdb.sql.
+Other configurations of Wookie can also be run; the main requirements are a servlet container and a database. The deployment and configuration operations can be determined by reviewing build.xml and build.properties. With some tweaking, the deploy-webapp task can be used to deploy Wookie to most any servlet container application.
 
-The deploy-webapp task can be used to deploy Wookie to any servlet container application.
+Both the RDBMS and JCR versions of Wookie depend only on container defined JNDI resources. Alternate persistence configurations are made by selecting the persistence manager component and supplying the required resource.
 
 Building and deploying widgets
 ==============================
-See http://incubator.apache.org/wookie/building-widgets.html
\ No newline at end of file
+See http://incubator.apache.org/wookie/building-widgets.html

Modified: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/AccessRequestTest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/AccessRequestTest.java?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/src-tests/org/apache/wookie/tests/AccessRequestTest.java (original)
+++ incubator/wookie/trunk/src-tests/org/apache/wookie/tests/AccessRequestTest.java Mon Aug 23 09:46:30 2010
@@ -18,43 +18,43 @@ import static org.junit.Assert.assertTru
 
 import java.net.URI;
 
-import org.apache.wookie.beans.AccessRequest;
+import org.apache.wookie.beans.IAccessRequest;
+import org.apache.wookie.beans.jpa.impl.AccessRequestImpl;
 import org.junit.Test;
 
-
 public class AccessRequestTest {
 
 	@Test
 	public void wildcardTest() throws Exception{
-		AccessRequest ar = new AccessRequest();
+		IAccessRequest ar = new AccessRequestImpl();
 		ar.setOrigin("*");
 		assertTrue(ar.isAllowed(new URI("http://incubator.apache.org")));
 	}
 	
 	@Test
 	public void basicTest() throws Exception{
-		AccessRequest ar = new AccessRequest();
+		IAccessRequest ar = new AccessRequestImpl();
 		ar.setOrigin("http://incubator.apache.org");
 		assertTrue(ar.isAllowed(new URI("http://incubator.apache.org")));
 	}
 	
 	@Test
 	public void pathsTest() throws Exception{
-		AccessRequest ar = new AccessRequest();
+		IAccessRequest ar = new AccessRequestImpl();
 		ar.setOrigin("http://incubator.apache.org");
 		assertTrue(ar.isAllowed(new URI("http://incubator.apache.org/test")));
 	}
 	
 	@Test
 	public void schemesTest() throws Exception{
-		AccessRequest ar = new AccessRequest();
+		IAccessRequest ar = new AccessRequestImpl();
 		ar.setOrigin("http://incubator.apache.org");
 		assertFalse(ar.isAllowed(new URI("https://incubator.apache.org/test")));
 	}
 	
 	@Test
 	public void subDomainsTest() throws Exception{
-		AccessRequest ar = new AccessRequest();
+		IAccessRequest ar = new AccessRequestImpl();
 		ar.setOrigin("http://apache.org");
 		ar.setSubdomains(true);
 		assertTrue(ar.isAllowed(new URI("http://incubator.apache.org")));
@@ -64,7 +64,7 @@ public class AccessRequestTest {
 	
 	@Test
 	public void noSubDomainsTest() throws Exception{
-		AccessRequest ar = new AccessRequest();
+		IAccessRequest ar = new AccessRequestImpl();
 		ar.setOrigin("http://apache.org");
 		ar.setSubdomains(false);
 		assertTrue(ar.isAllowed(new URI("http://apache.org")));

Modified: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/FeatureLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/FeatureLoaderTest.java?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/src-tests/org/apache/wookie/tests/FeatureLoaderTest.java (original)
+++ incubator/wookie/trunk/src-tests/org/apache/wookie/tests/FeatureLoaderTest.java Mon Aug 23 09:46:30 2010
@@ -13,20 +13,16 @@
  */
 package org.apache.wookie.tests;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 import org.junit.Test;
 
-import org.apache.wookie.beans.ServerFeature;
 import org.apache.wookie.feature.FeatureLoader;
 
-
 public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void nullTest() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature(null, null);
+		FeatureLoader.validateFeature(null, null);
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -34,8 +30,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void nullTest2() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature(null, "fail");
+		FeatureLoader.validateFeature(null, "fail");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -43,8 +38,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void nullTest3() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("fail:", null);
+		FeatureLoader.validateFeature("fail:", null);
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -52,8 +46,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void badClass() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("fail:", "org.apache.wookie.NoSuchClass");
+		FeatureLoader.validateFeature("fail:", "org.apache.wookie.NoSuchClass");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -61,8 +54,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void badClass2() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("fail:", "");
+		FeatureLoader.validateFeature("fail:", "");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -70,8 +62,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void badClass3() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("fail:", "org.apache.wookie.beans.Name");
+		FeatureLoader.validateFeature("fail:", "org.apache.wookie.beans.Name");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -79,8 +70,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void badName() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("FAIL", "org.apache.wookie.feature.conformance.Test");
+		FeatureLoader.validateFeature("FAIL", "org.apache.wookie.feature.conformance.Test");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -88,8 +78,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void badName2() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("", "org.apache.wookie.feature.conformance.Test");
+		FeatureLoader.validateFeature("", "org.apache.wookie.feature.conformance.Test");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -97,8 +86,7 @@ public class FeatureLoaderTest {
 	
 	@Test(expected=Exception.class)
 	public void mismatch() throws Exception{
-		@SuppressWarnings("unused")
-		ServerFeature sf = FeatureLoader.createFeature("fail:", "org.apache.wookie.feature.conformance.Test");
+		FeatureLoader.validateFeature("fail:", "org.apache.wookie.feature.conformance.Test");
         // Uh-oh! No exception was thrown so we 
         // better make this test fail!
         fail("should've thrown an exception!");
@@ -107,9 +95,7 @@ public class FeatureLoaderTest {
 	@Test
 	public void valid(){
 		try {
-			ServerFeature sf = FeatureLoader.createFeature("feature:a9bb79c1", "org.apache.wookie.feature.conformance.Test");
-			assertEquals(sf.getFeatureName(), "feature:a9bb79c1");
-			assertEquals(sf.getClassName(), "org.apache.wookie.feature.conformance.Test");
+			FeatureLoader.validateFeature("feature:a9bb79c1", "org.apache.wookie.feature.conformance.Test");
 		} catch (Exception e) {
 			fail("Couldn't create valid feature");
 		}

Modified: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/OpenSocialUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/OpenSocialUtilsTest.java?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/src-tests/org/apache/wookie/tests/OpenSocialUtilsTest.java (original)
+++ incubator/wookie/trunk/src-tests/org/apache/wookie/tests/OpenSocialUtilsTest.java Mon Aug 23 09:46:30 2010
@@ -17,48 +17,49 @@ package org.apache.wookie.tests;
 import static org.junit.Assert.*;
 
 import org.apache.wookie.Messages;
-import org.apache.wookie.beans.Widget;
-import org.apache.wookie.beans.WidgetInstance;
+import org.apache.wookie.beans.IStartFile;
+import org.apache.wookie.beans.IWidget;
+import org.apache.wookie.beans.IWidgetInstance;
+import org.apache.wookie.beans.jpa.impl.StartFileImpl;
+import org.apache.wookie.beans.jpa.impl.WidgetImpl;
+import org.apache.wookie.beans.jpa.impl.WidgetInstanceImpl;
 import org.apache.wookie.util.opensocial.OpenSocialUtils;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class OpenSocialUtilsTest{
 	
-	private static WidgetInstance INSTANCE;
-	private static WidgetInstance INSTANCE_NO_WIDGET;
-	private static WidgetInstance INSTANCE_NO_IDKEY;
-	private static WidgetInstance INSTANCE_NO_USER_ID;
+	private static IWidgetInstance INSTANCE;
+	private static IWidgetInstance INSTANCE_NO_WIDGET;
+	private static IWidgetInstance INSTANCE_NO_IDKEY;
+	private static IWidgetInstance INSTANCE_NO_USER_ID;
 	private static Messages BUNDLE;
 	
 	@BeforeClass 
 	public static void setUp(){
-		Widget widget = new Widget();
-		//widget.setUrl("http://getwookie.org/test/index.html"); FIXME
+		IWidget widget = new WidgetImpl();
 		widget.setGuid("http://getwookie.org/test");
-		widget.setId(1);
+		IStartFile startFile = new StartFileImpl();
+        startFile.setUrl("http://getwookie.org/test/index.html");
+        startFile.setLang("en");
+		widget.getStartFiles().add(startFile);
 		
-		INSTANCE = new WidgetInstance();
+		INSTANCE = new WidgetInstanceImpl();
 		INSTANCE.setWidget(widget);
-		INSTANCE.setId(1);
 		INSTANCE.setIdKey("xhKEoiff/4ltxSuuBmPjjxBx5hw.eq.");
 		INSTANCE.setUserId("scott");
 
-		INSTANCE_NO_WIDGET = new WidgetInstance();
-		INSTANCE_NO_WIDGET.setId(1);
+		INSTANCE_NO_WIDGET = new WidgetInstanceImpl();
 		INSTANCE_NO_WIDGET.setIdKey("xhKEoiff/4ltxSuuBmPjjxBx5hw.eq.");
 		INSTANCE_NO_WIDGET.setUserId("scott");
 		
-		INSTANCE_NO_IDKEY = new WidgetInstance();
+		INSTANCE_NO_IDKEY = new WidgetInstanceImpl();
 		INSTANCE_NO_IDKEY.setWidget(widget);
-		INSTANCE_NO_IDKEY.setId(1);
 		INSTANCE_NO_IDKEY.setUserId("scott");
 		
-		INSTANCE_NO_USER_ID = new WidgetInstance();
-		INSTANCE_NO_USER_ID.setWidget(widget);
-		INSTANCE_NO_USER_ID.setId(1);
+		INSTANCE_NO_USER_ID = new WidgetInstanceImpl();
+        INSTANCE_NO_USER_ID.setWidget(widget);
 		INSTANCE_NO_USER_ID.setIdKey("xhKEoiff/4ltxSuuBmPjjxBx5hw.eq.");
-		
 	}
 
 	@Test

Propchange: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/conformance/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/src-tests/org/apache/wookie/tests/conformance:948461-988031*
+/incubator/wookie/branches/standalone/src-tests/org/apache/wookie/tests/conformance:827972-831908

Propchange: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/conformance/PackagingAndConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/src-tests/org/apache/wookie/tests/conformance/PackagingAndConfiguration.java:948461-988031
+/incubator/wookie/branches/standalone/src-tests/org/apache/wookie/tests/conformance/PackagingAndConfiguration.java:827972-831908

Propchange: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/conformance/WidgetInterface.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 23 09:46:30 2010
@@ -0,0 +1,2 @@
+/incubator/wookie/branches/pluggablepersistence/src-tests/org/apache/wookie/tests/conformance/WidgetInterface.java:948461-988031
+/incubator/wookie/branches/standalone/src-tests/org/apache/wookie/tests/conformance/WidgetInterface.java:827972-831908

Modified: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java (original)
+++ incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java Mon Aug 23 09:46:30 2010
@@ -96,13 +96,13 @@ public class WidgetsControllerTest exten
 	    	fail("get failed");
 	    }
 	}
-	
+
 	// We expect a valid response, just no actual widgets
 	@Test
-	public void getWidgetType_noneexistant(){
+	public void getWidgetType_empty(){
 	    try {
 	        HttpClient client = new HttpClient();
-	        GetMethod get = new GetMethod(TEST_WIDGETS_SERVICE_URL_VALID+"/nosuchtype");
+	        GetMethod get = new GetMethod(TEST_WIDGETS_SERVICE_URL_VALID+"/games");
 	        client.executeMethod(get);
 	        int code = get.getStatusCode();
 	        assertEquals(200,code);
@@ -116,4 +116,21 @@ public class WidgetsControllerTest exten
 	    }
 	}
 	
+	// resource doesn't match either a widget.id or a widgetservice.servicename
+	@Test
+	public void getWidgetType_noneexistant(){
+	    try {
+	        HttpClient client = new HttpClient();
+	        GetMethod get = new GetMethod(TEST_WIDGETS_SERVICE_URL_VALID+"/nosuchtype");
+	        client.executeMethod(get);
+	        int code = get.getStatusCode();
+	        assertEquals(404,code);
+	        get.releaseConnection();
+	    }
+	    catch (Exception e) {
+	    	e.printStackTrace();
+	    	fail("get failed");
+	    }
+	}
+	
 }

Modified: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/integration/GadgetUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/integration/GadgetUtilsTest.java?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/src-tests/org/apache/wookie/tests/integration/GadgetUtilsTest.java (original)
+++ incubator/wookie/trunk/src-tests/org/apache/wookie/tests/integration/GadgetUtilsTest.java Mon Aug 23 09:46:30 2010
@@ -16,7 +16,7 @@ package org.apache.wookie.tests.integrat
 
 import static org.junit.Assert.*;
 
-import org.apache.wookie.beans.Widget;
+import org.apache.wookie.beans.IWidget;
 import org.apache.wookie.tests.helpers.MockHttpServletRequest;
 import org.apache.wookie.util.gadgets.GadgetUtils;
 import org.apache.wookie.w3c.W3CWidget;
@@ -197,7 +197,7 @@ public class GadgetUtilsTest {
 	@Test
 	public void getWidgetWithValidMetadata() {
 		@SuppressWarnings("unused")
-		Widget widget = null;
+		IWidget widget = null;
 		try {
 			assertNotNull(GadgetUtils.getWidget(TEST_METADATA_VALID, SHINDIG));
 		} catch (Exception e) {
@@ -218,7 +218,7 @@ public class GadgetUtilsTest {
 	@Test
 	public void getWidgetWithMetadataNoResults() {
 		@SuppressWarnings("unused")
-		Widget widget = null;
+		IWidget widget = null;
 		try {
 			assertNull(GadgetUtils.getWidget(TEST_METADATA_NO_GADGETS, SHINDIG));
 		} catch (Exception e) {

Modified: incubator/wookie/trunk/src/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/log4j.properties?rev=988048&r1=988047&r2=988048&view=diff
==============================================================================
--- incubator/wookie/trunk/src/log4j.properties (original)
+++ incubator/wookie/trunk/src/log4j.properties Mon Aug 23 09:46:30 2010
@@ -10,21 +10,11 @@ log4j.appender.widgety.Target=System.out
 log4j.appender.widgety.layout=org.apache.log4j.PatternLayout
 log4j.appender.widgety.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
 
-
-### direct messages to file hibernate.log ###
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
 ### set log levels - for more verbose logging change 'info' to 'debug' ###
 
 #log4j.rootLogger=DEBUG, INFO, warn, stdout
 log4j.rootLogger=warn, stdout
 
-log4j.logger.org.hibernate=warn
-#log4j.logger.org.hibernate=debug
-
 ### log level for the this project - change this to "info" to kill the debug messages
 log4j.logger.org.apache.wookie=info, widgety
 log4j.logger.org.directwebremoting.impl.DefaultCreatorManager=info, widgety
@@ -32,32 +22,3 @@ log4j.logger.org.directwebremoting.impl.
 
 log4j.category.org.directwebremoting=warn
 log4j.additivity.org.directwebremoting=false
-
-### log HQL query parser activity
-#log4j.logger.org.hibernate.hql.ast.AST=debug
-
-### log just the SQL
-#log4j.logger.org.hibernate.SQL=debug
-
-### log JDBC bind parameters ###
-#log4j.logger.org.hibernate.type=info
-#log4j.logger.org.hibernate.type=debug
-
-### log schema export/update ###
-l#og4j.logger.org.hibernate.tool.hbm2ddl=debug
-
-### log HQL parse trees
-#log4j.logger.org.hibernate.hql=debug
-
-### log cache activity ###
-#log4j.logger.org.hibernate.cache=debug
-
-### log transaction activity
-#log4j.logger.org.hibernate.transaction=debug
-
-### log JDBC resource acquisition
-#log4j.logger.org.hibernate.jdbc=debug
-
-### enable the following line if you want to track down connection ###
-### leakages when using DriverManagerConnectionProvider ###
-#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace