You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2011/03/13 21:04:01 UTC

svn commit: r1081213 [1/2] - in /openejb/trunk/openejb3/examples/webapps/moviefun: ./ app/ app/src/ app/src/main/ app/src/main/java/ app/src/main/java/org/ app/src/main/java/org/superbiz/ app/src/main/java/org/superbiz/moviefun/ app/src/main/java/org/s...

Author: jgallimore
Date: Sun Mar 13 20:03:59 2011
New Revision: 1081213

URL: http://svn.apache.org/viewvc?rev=1081213&view=rev
Log:
Refactored project structure and pulled in notification app from https://svn.apache.org/repos/asf/openejb/branches/misc/moviefun-monitor/

Added:
    openejb/trunk/openejb3/examples/webapps/moviefun/app/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/delete-movie.pl
    openejb/trunk/openejb3/examples/webapps/moviefun/app/get-movies.pl
    openejb/trunk/openejb3/examples/webapps/moviefun/app/pom.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/ActionServlet.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movie.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MovieController.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movies.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MoviesImpl.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Notifier.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/NotifierImpl.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/JsfUtil.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/PaginationHelper.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/Bundle.properties
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/ejb-jar.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/persistence.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/META-INF/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/META-INF/context.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/faces-config.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/web.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/default.css
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.jsp
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.xhtml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Create.xhtml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Edit.xhtml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/List.xhtml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/View.xhtml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/moviefun.jsp
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/resources/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/resources/css/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/resources/css/jsfcrud.css
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/setup.jsp
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/template.xhtml
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/java/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/java/org/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/java/org/superbiz/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/java/org/superbiz/moviefun/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/java/org/superbiz/moviefun/MoviesTest.java
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/resources/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/resources/META-INF/
    openejb/trunk/openejb3/examples/webapps/moviefun/app/src/test/resources/META-INF/application-client.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/pom.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/assembly/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/assembly/client.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/java/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/java/org/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/java/org/superbiz/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/java/org/superbiz/moviefun/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/java/org/superbiz/moviefun/NotificationMonitor.java
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/java/org/superbiz/moviefun/NotificationsBean.java
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/resources/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/resources/META-INF/
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/resources/META-INF/ejb-jar.xml
    openejb/trunk/openejb3/examples/webapps/moviefun/monitor/src/main/resources/jndi.properties
Removed:
    openejb/trunk/openejb3/examples/webapps/moviefun/delete-movie.pl
    openejb/trunk/openejb3/examples/webapps/moviefun/get-movies.pl
    openejb/trunk/openejb3/examples/webapps/moviefun/src/
Modified:
    openejb/trunk/openejb3/examples/webapps/moviefun/pom.xml

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/delete-movie.pl
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/delete-movie.pl?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/delete-movie.pl (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/delete-movie.pl Sun Mar 13 20:03:59 2011
@@ -0,0 +1,37 @@
+#!/usr/bin/env perl -w
+#============================================================
+# 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.
+#============================================================
+
+#use SOAP::Lite 'trace', 'debug';
+use SOAP::Lite;
+
+my $ID = $ARGV[0];
+
+my $namespace = 'http://superbiz.org/wsdl';
+
+my $service = SOAP::Lite-> uri($namespace) 
+    ->proxy('http://localhost:8080/Movies') 
+    ->on_action (sub { return '' } ); 
+
+my $method = SOAP::Data->name("ns1:deleteMovieId") 
+    ->attr({'xmlns:ns1' => $namespace}); 
+
+my @params = (SOAP::Data->name('arg0'=> $ID));
+
+
+my $response =  $service->call($method=>@params);
+

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/get-movies.pl
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/get-movies.pl?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/get-movies.pl (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/get-movies.pl Sun Mar 13 20:03:59 2011
@@ -0,0 +1,47 @@
+#!/usr/bin/env perl -w
+#============================================================
+# 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.
+#============================================================
+
+#use SOAP::Lite 'trace', 'debug';
+use SOAP::Lite;
+
+my $namespace = 'http://superbiz.org/wsdl';
+
+my $service = SOAP::Lite-> uri($namespace) 
+    ->proxy('http://localhost:8080/Movies') 
+    ->on_action (sub { return '' } ); 
+
+my $method = SOAP::Data->name("ns1:getMovies") 
+    ->attr({'xmlns:ns1' => $namespace}); 
+
+#my @params = (
+#    SOAP::Data->name('arg0'=>3), 
+#    SOAP::Data->name('arg1'=>4)); 
+
+my $response =  $service->call($method=>@params);
+
+for my $movie ($response->valueof('//return')) {
+    while ( my ($key, $value) = each(%$movie) ) {
+	print "$key => $value\n";
+    }
+    print "\n";
+}
+
+
+
+
+

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/pom.xml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/pom.xml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/pom.xml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,119 @@
+<?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.
+-->
+
+<!-- $Rev: 684173 $ $Date: 2008-08-08 20:13:24 -0700 (Fri, 08 Aug 2008) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" 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>
+  <parent>
+    <groupId>org.superbiz</groupId>
+    <artifactId>moviefun</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+  <groupId>org.superbiz</groupId>
+  <artifactId>moviefun-app</artifactId>
+  <packaging>war</packaging>
+  <version>1.1-SNAPSHOT</version>
+  <name>OpenEJB :: Web Examples :: Moviefun :: App</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <repositories>
+    <repository>
+      <id>apache-m2-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.6</version>
+      </plugin>
+      <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>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>6.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>jstl</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-impl</artifactId>
+      <version>2.0.3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-api</artifactId>
+      <version>2.0.3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>3.2-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>taglibs</groupId>
+      <artifactId>standard</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+  </dependencies>
+  <!--
+  This section allows you to configure where to publish libraries for sharing.
+  It is not required and may be deleted.  For more information see:
+  http://maven.apache.org/plugins/maven-deploy-plugin/
+  -->
+  <distributionManagement>
+    <repository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/repo/</url>
+    </repository>
+    <snapshotRepository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/snapshot-repo/</url>
+    </snapshotRepository>
+  </distributionManagement>
+</project>
\ No newline at end of file

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/ActionServlet.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/ActionServlet.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/ActionServlet.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/ActionServlet.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,32 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun;
+
+import javax.servlet.http.HttpServlet;
+import javax.ejb.EJB;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ActionServlet extends HttpServlet {
+
+    @EJB(name = "movies")
+    private Movies movies;
+
+    
+
+}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movie.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movie.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movie.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movie.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,106 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+
+@Entity
+public class Movie implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private long id;
+
+    private String director;
+    private String title;
+    private int year;
+    private String genre;
+    private int rating;
+
+
+    public Movie() {
+    }
+
+    public Movie(String title, String director, String genre, int rating, int year) {
+        this.director = director;
+        this.title = title;
+        this.year = year;
+        this.genre = genre;
+        this.rating = rating;
+    }
+
+    public Movie(String director, String title, int year) {
+        this.director = director;
+        this.title = title;
+        this.year = year;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDirector() {
+        return director;
+    }
+
+    public void setDirector(String director) {
+        this.director = director;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(int year) {
+        this.year = year;
+    }
+
+    public String getGenre() {
+        return genre;
+    }
+
+    public void setGenre(String genre) {
+        this.genre = genre;
+    }
+
+    public int getRating() {
+        return rating;
+    }
+
+    public void setRating(int rating) {
+        this.rating = rating;
+    }
+}
\ No newline at end of file

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MovieController.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MovieController.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MovieController.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MovieController.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,238 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun;
+
+import org.superbiz.moviefun.Movie;
+import org.superbiz.moviefun.util.JsfUtil;
+import org.superbiz.moviefun.util.PaginationHelper;
+
+import java.io.Serializable;
+import java.util.ResourceBundle;
+import javax.ejb.EJB;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
+import javax.faces.model.SelectItem;
+
+@ManagedBean (name="movieController")
+@SessionScoped
+public class MovieController implements Serializable {
+
+
+    private Movie current;
+    private DataModel items = null;
+    @EJB private MoviesImpl ejbFacade;
+    private PaginationHelper pagination;
+    private int selectedItemIndex;
+
+    public MovieController() {
+    }
+
+    public Movie getSelected() {
+        if (current == null) {
+            current = new Movie();
+            selectedItemIndex = -1;
+        }
+        return current;
+    }
+
+    private MoviesImpl getFacade() {
+        return ejbFacade;
+    }
+    public PaginationHelper getPagination() {
+        if (pagination == null) {
+            pagination = new PaginationHelper(10) {
+
+                @Override
+                public int getItemsCount() {
+                    return getFacade().count();
+                }
+
+                @Override
+                public DataModel createPageDataModel() {
+                    return new ListDataModel(getFacade().findRange(new int[]{getPageFirstItem(), getPageFirstItem()+getPageSize()}));
+                }
+            };
+        }
+        return pagination;
+    }
+
+    public String prepareList() {
+        recreateModel();
+        return "List";
+    }
+
+    public String prepareView() {
+        current = (Movie)getItems().getRowData();
+        selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
+        return "View";
+    }
+
+    public String prepareCreate() {
+        current = new Movie();
+        selectedItemIndex = -1;
+        return "Create";
+    }
+
+    public String create() {
+        try {
+            getFacade().addMovie(current);
+            JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("MovieCreated"));
+            return prepareCreate();
+        } catch (Exception e) {
+            JsfUtil.addErrorMessage(e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
+            return null;
+        }
+    }
+
+    public String prepareEdit() {
+        current = (Movie)getItems().getRowData();
+        selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
+        return "Edit";
+    }
+
+    public String update() {
+        try {
+            getFacade().editMovie(current);
+            JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("MovieUpdated"));
+            return "View";
+        } catch (Exception e) {
+            JsfUtil.addErrorMessage(e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
+            return null;
+        }
+    }
+
+    public String destroy() {
+        current = (Movie)getItems().getRowData();
+        selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
+        performDestroy();
+        recreateModel();
+        return "List";
+    }
+
+    public String destroyAndView() {
+        performDestroy();
+        recreateModel();
+        updateCurrentItem();
+        if (selectedItemIndex >= 0) {
+            return "View";
+        } else {
+            // all items were removed - go back to list
+            recreateModel();
+            return "List";
+        }
+    }
+
+    private void performDestroy() {
+        try {
+            getFacade().deleteMovie(current);
+            JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("MovieDeleted"));
+        } catch (Exception e) {
+            JsfUtil.addErrorMessage(e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
+        }
+    }
+
+    private void updateCurrentItem() {
+        int count = getFacade().count();
+        if (selectedItemIndex >= count) {
+            // selected index cannot be bigger than number of items:
+            selectedItemIndex = count-1;
+            // go to previous page if last page disappeared:
+            if (pagination.getPageFirstItem() >= count) {
+                pagination.previousPage();
+            }
+        }
+        if (selectedItemIndex >= 0) {
+            current = getFacade().findRange(new int[]{selectedItemIndex, selectedItemIndex+1}).get(0);
+        }
+    }
+
+    public DataModel getItems() {
+        if (items == null) {
+            items = getPagination().createPageDataModel();
+        }
+        return items;
+    }
+
+    private void recreateModel() {
+        items = null;
+    }
+
+    public String next() {
+        getPagination().nextPage();
+        recreateModel();
+        return "List";
+    }
+
+    public String previous() {
+        getPagination().previousPage();
+        recreateModel();
+        return "List";
+    }
+
+    public SelectItem[] getItemsAvailableSelectMany() {
+        return JsfUtil.getSelectItems(ejbFacade.getMovies(), false);
+    }
+
+    public SelectItem[] getItemsAvailableSelectOne() {
+        return JsfUtil.getSelectItems(ejbFacade.getMovies(), true);
+    }
+
+    @FacesConverter(forClass=Movie.class)
+    public static class MovieControllerConverter implements Converter {
+
+        public Object getAsObject(FacesContext facesContext, UIComponent component, String value) {
+            if (value == null || value.length() == 0) {
+                return null;
+            }
+            MovieController controller = (MovieController)facesContext.getApplication().getELResolver().
+                    getValue(facesContext.getELContext(), null, "movieController");
+            return controller.ejbFacade.find(getKey(value));
+        }
+
+        long getKey(String value) {
+            long key;
+            key = Long.parseLong(value);
+            return key;
+        }
+
+        String getStringKey(long value) {
+            StringBuffer sb = new StringBuffer();
+            sb.append(value);
+            return sb.toString();
+        }
+
+        public String getAsString(FacesContext facesContext, UIComponent component, Object object) {
+            if (object == null) {
+                return null;
+            }
+            if (object instanceof Movie) {
+                Movie o = (Movie) object;
+                return getStringKey(o.getId());
+            } else {
+                throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: "+MovieController.class.getName());
+            }
+        }
+
+    }
+
+}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movies.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movies.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movies.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Movies.java Sun Mar 13 20:03:59 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.
+ */
+package org.superbiz.moviefun;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+@Local
+public interface Movies {
+	public  int count();
+	public  List<Movie> findRange(int[] range);
+	public  List<Movie> findByDirector(String director);
+	public  List<Movie> findByGenre(String genre);
+	public  List<Movie> findByTitle(String title);
+	public  List<Movie> getMovies();
+	public  void deleteMovieId(long id);
+	public  void deleteMovie(Movie movie);
+	public  void editMovie(Movie movie);
+	public  void addMovie(Movie movie);
+	public  Movie find(Long id);
+}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MoviesImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MoviesImpl.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MoviesImpl.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/MoviesImpl.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,131 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun;
+
+import java.util.List;
+
+import javax.ejb.EJB;
+import javax.ejb.LocalBean;
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Path;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import javax.persistence.metamodel.EntityType;
+
+@LocalBean
+@Stateless(name = "Movies")
+@WebService(portName = "MoviesPort",
+        serviceName = "MoviesWebService",
+        targetNamespace = "http://superbiz.org/wsdl")
+public class MoviesImpl implements Movies {
+
+    @EJB
+    private Notifier notifier;
+
+    @PersistenceContext(unitName = "movie-unit")
+    private EntityManager entityManager;
+
+    @Override
+	public Movie find(Long id) {
+        return entityManager.find(Movie.class, id);
+    }
+    
+    @Override
+	public void addMovie(Movie movie) {
+        entityManager.persist(movie);
+    }
+    
+    @Override
+	public void editMovie(Movie movie) {
+        entityManager.merge(movie);
+    }
+
+    @Override
+	public void deleteMovie(Movie movie) {
+        entityManager.remove(movie);
+    }
+
+    @Override
+	public void deleteMovieId(long id) {
+        Movie movie = entityManager.find(Movie.class, id);
+        entityManager.remove(movie);
+
+        notifier.notify("Deleted Movie \"" + movie.getTitle() + "\" (" + movie.getYear() + ")");
+    }
+
+    @Override
+	public List<Movie> getMovies() {
+    	CriteriaQuery<Movie> cq = entityManager.getCriteriaBuilder().createQuery(Movie.class);
+        cq.select(cq.from(Movie.class));
+        return entityManager.createQuery(cq).getResultList();
+    }
+
+    @Override
+	public List<Movie> findByTitle(String title) {
+    	return findByStringField("title", title);
+    }
+
+	@Override
+	public List<Movie> findByGenre(String genre) {
+		return findByStringField("genre", genre);
+    }
+
+    @Override
+	public List<Movie> findByDirector(String director) {
+    	return findByStringField("director", director);
+    }
+    
+    private List<Movie> findByStringField(String fieldname, String param) {
+		CriteriaBuilder builder = entityManager.getCriteriaBuilder();
+		CriteriaQuery<Movie> query = builder.createQuery(Movie.class);
+	    Root<Movie> root = query.from(Movie.class);
+	    EntityType<Movie> type = entityManager.getMetamodel().entity(Movie.class);
+	    
+		Path<String> path = root.get(type.getDeclaredSingularAttribute(fieldname, String.class));
+	    Predicate condition = builder.like(path, "%" + param + "%"); 
+	    
+	    query.where(condition);
+	    
+		return entityManager.createQuery(query).getResultList();
+	}
+
+	@Override
+	public List<Movie> findRange(int[] range) {
+        CriteriaQuery<Movie> cq = entityManager.getCriteriaBuilder().createQuery(Movie.class);
+        cq.select(cq.from(Movie.class));
+        TypedQuery<Movie> q = entityManager.createQuery(cq);
+        q.setMaxResults(range[1] - range[0]);
+        q.setFirstResult(range[0]);
+        return q.getResultList();
+    }
+
+    @Override
+	public int count() {
+        CriteriaQuery<Long> cq = entityManager.getCriteriaBuilder().createQuery(Long.class);
+        Root<Movie> rt = cq.from(Movie.class);
+        cq.select(entityManager.getCriteriaBuilder().count(rt));
+        TypedQuery<Long> q = entityManager.createQuery(cq);
+        return (q.getSingleResult()).intValue();
+    }
+
+}
\ No newline at end of file

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Notifier.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Notifier.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Notifier.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/Notifier.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface Notifier {
+    void notify(String message);
+}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/NotifierImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/NotifierImpl.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/NotifierImpl.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/NotifierImpl.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,71 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun;
+
+import javax.annotation.Resource;
+import javax.ejb.Stateless;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.DeliveryMode;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+
+@Stateless
+public class NotifierImpl implements Notifier {
+
+    @Resource
+    private ConnectionFactory connectionFactory;
+
+    @Resource(name = "notifications")
+    private Topic notificationsTopic;
+
+    public void notify(String message) {
+        try {
+            Connection connection = null;
+            Session session = null;
+
+            try {
+                connection = connectionFactory.createConnection();
+                connection.start();
+
+                // Create a Session
+                session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+                // Create a MessageProducer from the Session to the Topic or Queue
+                MessageProducer producer = session.createProducer(notificationsTopic);
+                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+                // Create a message
+                TextMessage textMessage = session.createTextMessage(message);
+
+                // Tell the producer to send the message
+                producer.send(textMessage);
+            } finally {
+                // Clean up
+                if (session != null) session.close();
+                if (connection != null) connection.close();
+            }
+        } catch (JMSException e) {
+            throw new IllegalStateException(e);
+        }
+
+    }
+
+}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/JsfUtil.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/JsfUtil.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/JsfUtil.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/JsfUtil.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,76 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun.util;
+
+import java.util.List;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.model.SelectItem;
+
+public class JsfUtil {
+    
+    public static SelectItem[] getSelectItems(List<?> entities, boolean selectOne) {
+        int size = selectOne ? entities.size() + 1 : entities.size();
+        SelectItem[] items = new SelectItem[size];
+        int i = 0;
+        if (selectOne) {
+            items[0] = new SelectItem("", "---");
+            i++;
+        }
+        for (Object x : entities) {
+            items[i++] = new SelectItem(x, x.toString());
+        }
+        return items;
+    }
+    
+    public static void addErrorMessage(Exception ex, String defaultMsg) {
+        String msg = ex.getLocalizedMessage();
+        if (msg != null && msg.length() > 0) {
+            addErrorMessage(msg);
+        } else {
+            addErrorMessage(defaultMsg);
+        }
+    }
+    
+    public static void addErrorMessages(List<String> messages) {
+        for (String message : messages) {
+            addErrorMessage(message);
+        }
+    }
+
+    public static void addErrorMessage(String msg) {
+        FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
+        FacesContext.getCurrentInstance().addMessage(null, facesMsg);
+    }
+
+    public static void addSuccessMessage(String msg) {
+        FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
+        FacesContext.getCurrentInstance().addMessage("successInfo", facesMsg);
+    }
+    
+    public static String getRequestParameter(String key) {
+        return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(key);
+    }
+    
+    public static Object getObjectFromRequestParameter(String requestParameterName, Converter converter, UIComponent component) {
+        String theId = JsfUtil.getRequestParameter(requestParameterName);
+        return converter.getAsObject(FacesContext.getCurrentInstance(), component, theId);
+    }
+    
+}
\ No newline at end of file

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/PaginationHelper.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/PaginationHelper.java?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/PaginationHelper.java (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/java/org/superbiz/moviefun/util/PaginationHelper.java Sun Mar 13 20:03:59 2011
@@ -0,0 +1,74 @@
+/**
+ * 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.
+ */
+package org.superbiz.moviefun.util;
+
+import javax.faces.model.DataModel;
+
+public abstract class PaginationHelper {
+
+    private int pageSize;
+    private int page;
+
+    public PaginationHelper(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public abstract int getItemsCount();
+
+    public abstract DataModel createPageDataModel();
+
+    public int getPageFirstItem() {
+        return page*pageSize;
+    }
+
+    public int getPageLastItem() {
+        int i = getPageFirstItem() + pageSize -1;
+        int count = getItemsCount() - 1;
+        if (i > count) {
+            i = count;
+        }
+        if (i < 0) {
+            i = 0;
+        }
+        return i;
+    }
+
+    public boolean isHasNextPage() {
+        return (page+1)*pageSize+1 <= getItemsCount();
+    }
+
+    public void nextPage() {
+        if (isHasNextPage()) {
+            page++;
+        }
+    }
+
+    public boolean isHasPreviousPage() {
+        return page > 0;
+    }
+
+    public void previousPage() {
+        if (isHasPreviousPage()) {
+            page--;
+        }
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/Bundle.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/Bundle.properties?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/Bundle.properties (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/Bundle.properties Sun Mar 13 20:03:59 2011
@@ -0,0 +1,71 @@
+PersistenceErrorOccured=A persistence error occurred.
+Previous=Previous
+Next=Next
+
+MovieCreated=Movie was successfully created.
+MovieUpdated=Movie was successfully updated.
+MovieDeleted=Movie was successfully deleted.
+CreateMovieTitle=Create New Movie
+CreateMovieSaveLink=Save
+CreateMovieShowAllLink=Show All Movie Items
+CreateMovieIndexLink=Index
+CreateMovieLabel_id=Id:
+CreateMovieTitle_id=Id
+CreateMovieLabel_director=Director:
+CreateMovieTitle_director=Director
+CreateMovieLabel_title=Title:
+CreateMovieTitle_title=Title
+CreateMovieLabel_year=Year:
+CreateMovieTitle_year=Year
+CreateMovieLabel_genre=Genre:
+CreateMovieTitle_genre=Genre
+CreateMovieLabel_rating=Rating:
+CreateMovieTitle_rating=Rating
+EditMovieTitle=Edit Movie
+EditMovieSaveLink=Save
+EditMovieViewLink=View
+EditMovieShowAllLink=Show All Movie Items
+EditMovieIndexLink=Index
+EditMovieLabel_id=Id:
+EditMovieTitle_id=Id
+EditMovieLabel_director=Director:
+EditMovieTitle_director=Director
+EditMovieLabel_title=Title:
+EditMovieTitle_title=Title
+EditMovieLabel_year=Year:
+EditMovieTitle_year=Year
+EditMovieLabel_genre=Genre:
+EditMovieTitle_genre=Genre
+EditMovieLabel_rating=Rating:
+EditMovieTitle_rating=Rating
+ViewMovieTitle=View
+ViewMovieDestroyLink=Destroy
+ViewMovieEditLink=Edit
+ViewMovieCreateLink=Create New Movie
+ViewMovieShowAllLink=Show All Movie Items
+ViewMovieIndexLink=Index
+ViewMovieLabel_id=Id:
+ViewMovieTitle_id=Id
+ViewMovieLabel_director=Director:
+ViewMovieTitle_director=Director
+ViewMovieLabel_title=Title:
+ViewMovieTitle_title=Title
+ViewMovieLabel_year=Year:
+ViewMovieTitle_year=Year
+ViewMovieLabel_genre=Genre:
+ViewMovieTitle_genre=Genre
+ViewMovieLabel_rating=Rating:
+ViewMovieTitle_rating=Rating
+ListMovieTitle=List
+ListMovieEmpty=(No Movie Items Found)
+ListMovieDestroyLink=Destroy
+ListMovieEditLink=Edit
+ListMovieViewLink=View
+ListMovieCreateLink=Create New Movie
+ListMovieIndexLink=Index
+ListMovieTitle_id=Id
+ListMovieTitle_director=Director
+ListMovieTitle_title=Title
+ListMovieTitle_year=Year
+ListMovieTitle_genre=Genre
+ListMovieTitle_rating=Rating

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/ejb-jar.xml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/ejb-jar.xml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/ejb-jar.xml Sun Mar 13 20:03:59 2011
@@ -0,0 +1 @@
+<ejb-jar/>
\ No newline at end of file

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/persistence.xml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/persistence.xml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/resources/META-INF/persistence.xml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,29 @@
+<?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 version="2.0" 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">
+    <persistence-unit name="movie-unit">
+        <jta-data-source>movieDatabase</jta-data-source>
+        <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+        <class>org.superbiz.moviefun.Movie</class>
+
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>            
+        </properties>
+    </persistence-unit>
+</persistence>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/META-INF/context.xml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/META-INF/context.xml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/META-INF/context.xml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context antiJARLocking="true" path="/moviefun"/>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/faces-config.xml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/faces-config.xml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,29 @@
+<?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.
+-->
+<faces-config version="2.0"
+    xmlns="http://java.sun.com/xml/ns/javaee" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+    <application>
+        <resource-bundle>
+            <base-name>/Bundle</base-name>
+            <var>bundle</var>
+        </resource-bundle>
+    </application>
+</faces-config>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/web.xml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/web.xml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/WEB-INF/web.xml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,40 @@
+<?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.
+-->
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+    <context-param>
+        <param-name>javax.faces.PROJECT_STAGE</param-name>
+        <param-value>Development</param-value>
+    </context-param>
+    <servlet>
+        <servlet-name>ActionServlet</servlet-name>
+        <servlet-class>org.superbiz.moviefun.ActionServlet</servlet-class>
+    </servlet>
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>/faces/*</url-pattern>
+    </servlet-mapping>
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+</web-app>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/default.css
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/default.css?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/default.css (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/default.css Sun Mar 13 20:03:59 2011
@@ -0,0 +1,177 @@
+<!--
+
+    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.
+-->
+
+body, p, td, table, tr, .bodytext, .stepfield {
+	font-family: Verdana, arial, sans-serif;
+	font-size: 11px;
+	line-height: 16px;
+	color: #000000;
+	font-weight: normal;
+}
+
+body {
+	margin: 0px;
+	padding: 0px;
+	text-align: center;
+    background-color: #f0f0f0;
+}
+
+#Content {
+	text-align: left;
+	background-color: #fff;
+	padding: 0px;
+	margin: 0px;
+}
+
+HR {
+	color: 3c78b5;
+	height: 1;
+}
+
+A:link, A:visited, A:active, A:hover {
+	color: #003366;
+}
+
+h1 A:link, h1 A:visited, h1 A:active {
+	text-decoration: none;
+}
+
+h1 A:hover {
+    border-bottom: 1px dotted #003366;
+}
+
+input {
+	font-family: verdana, geneva, arial, sans-serif;
+	font-size: 11px;
+	color: #000000;
+}
+
+h1 {
+	font-size: 24px;
+	line-height: normal;
+	font-weight: bold;
+	background-color: #f0f0f0;
+	color: #003366;
+ 	border-bottom: 1px solid #3c78b5;
+	padding: 2px;
+	margin: 36px 0px 4px 0px;
+}
+
+h2 {
+	font-size: 18px;
+	line-height: normal;
+	font-weight: bold;
+	background-color: #f0f0f0;
+ 	border-bottom: 1px solid #3c78b5;
+	padding: 2px;
+	margin: 27px 0px 4px 0px;
+}
+
+h3 {
+	font-size: 14px;
+	line-height: normal;
+	font-weight: bold;
+	background-color: #f0f0f0;
+	padding: 2px;
+	margin: 21px 0px 4px 0px;
+}
+
+h4 {
+	font-size: 12px;
+	line-height: normal;
+	font-weight: bold;
+	background-color: #f0f0f0;
+	padding: 2px;
+	margin: 18px 0px 4px 0px;
+}
+
+h4.search {
+	font-size: 12px;
+	line-height: normal;
+	font-weight: normal;
+	background-color: #f0f0f0;
+	padding: 4px;
+	margin: 18px 0px 4px 0px;
+}
+
+h5 {
+	font-size: 10px;
+	line-height: normal;
+	font-weight: bold;
+	background-color: #f0f0f0;
+	padding: 2px;
+	margin: 14px 0px 4px 0px;
+}
+
+h6 {
+	font-size: 8px;
+	line-height: normal;
+	font-weight: bold;
+	background-color: #f0f0f0;
+	padding: 2px;
+	margin: 14px 0px 4px 0px;
+}
+
+.smalltext {
+    color: #666666;
+    font-size: 10px;
+}
+.smalltext a {
+    color: #666666;
+}
+
+.tableview table {
+    margin: 0;
+}
+
+.tableview th {
+    text-align: left;
+    color: #003366;
+    font-size: 12px;
+    padding: 5px 0px 0px 5px;
+    border-bottom: 2px solid #3c78b5;
+}
+.tableview td {
+    text-align: left;
+    border-color: #ccc;
+    border-width: 0px 0px 1px 0px;
+    border-style: solid;
+    margin: 0;
+    padding: 4px 10px 4px 5px;
+}
+
+.bottomshadow {
+    height: 12px;
+    background-image: url("/images/border/border_bottom.gif");
+    background-repeat: repeat-x;
+}
+
+.topBarDiv a:link {color: white;}
+.topBarDiv a:visited {color: white;}
+.topBarDiv a:active {color: white;}
+.topBarDiv a:hover {color: white;}
+.topBarDiv {color: white;}
+
+.topBar td {
+    background-color: #003366;
+}
+
+
+.basicPanelContainer {border: 1px solid #3c78b5; margin-top: 2px; margin-bottom: 8px; width: 100%}
+.basicPanelTitle {padding: 5px; margin: 0px; background-color: #f0f0f0; color: black; font-weight: bold;}
+.basicPanelBody {padding: 5px; margin: 0px}

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.jsp?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.jsp (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.jsp Sun Mar 13 20:03:59 2011
@@ -0,0 +1,43 @@
+<%--
+    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 contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head><title>Moviefun :: Index</title>
+<link rel="stylesheet" href="default.css" type="text/css" />
+</head>
+<body>
+<p/>
+<div id="Content">
+	<p>Please select one of the following links:</p>
+	<a href="setup.jsp">Setup</a> - Sets up the application with some sample data<br />
+	<a href="moviefun.jsp">JSP</a> - Use the JSP version of the application<br />
+	<a href="faces/index.xhtml">JSF</a> - Use the JSF 2 version of the application<br />
+
+
+    <div class="bottomshadow"></div>
+
+    <div id="poweredby" class="smalltext">
+        Powered by
+        <a href="http://tomcat.apache.org" class="smalltext">Apache Tomcat</a> and
+        <a href="http://openejb.apache.org" class="smalltext">Apache OpenEJB</a>.
+        <br/>
+    </div>
+
+
+</div>
+</body>
+</html>
\ No newline at end of file

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.xhtml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.xhtml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/index.xhtml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,48 @@
+<?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.
+-->
+<<<<<<< HEAD:openejb3/examples/webapps/moviefun/app/src/main/webapp/index.xhtml
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html">
+    <h:head>
+        <title>Moviefun Sample Application :: JSF 2.0</title>
+<h:outputStylesheet name="css/jsfcrud.css"/>
+    </h:head>
+    <h:body>
+      Welcome to the Moviefun sample application!
+       <h:form>
+       <h:commandLink action="/movie/List" value="Show All Movie Items"/>
+   	   </h:form>
+	</h:body>
+
+</html>
+
+=======
+<persistence version="2.0" 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">
+    <persistence-unit name="movie-unit">
+        <jta-data-source>movieDatabase</jta-data-source>
+        <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+        <class>org.superbiz.moviefun.Movie</class>
+
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>            
+        </properties>
+    </persistence-unit>
+</persistence>
+>>>>>>> 5e093c1e798dab6d0459468205a037f7c0b6d78d:openejb3/examples/webapps/moviefun/src/main/resources/META-INF/persistence.xml

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Create.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Create.xhtml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Create.xhtml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Create.xhtml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+
+    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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+    <ui:composition template="/template.xhtml">
+        <ui:define name="title">
+            <h:outputText value="#{bundle.CreateMovieTitle}"></h:outputText>
+        </ui:define>
+        <ui:define name="body">
+            <h:panelGroup id="messagePanel" layout="block">
+                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+            </h:panelGroup>
+            <h:form>
+                <h:panelGrid columns="2">
+                    <h:outputLabel value="#{bundle.CreateMovieLabel_id}" for="id" />
+                    <h:inputText id="id" value="#{movieController.selected.id}" title="#{bundle.CreateMovieTitle_id}" />
+                    <h:outputLabel value="#{bundle.CreateMovieLabel_director}" for="director" />
+                    <h:inputText id="director" value="#{movieController.selected.director}" title="#{bundle.CreateMovieTitle_director}" />
+                    <h:outputLabel value="#{bundle.CreateMovieLabel_title}" for="title" />
+                    <h:inputText id="title" value="#{movieController.selected.title}" title="#{bundle.CreateMovieTitle_title}" />
+                    <h:outputLabel value="#{bundle.CreateMovieLabel_year}" for="year" />
+                    <h:inputText id="year" value="#{movieController.selected.year}" title="#{bundle.CreateMovieTitle_year}" />
+                    <h:outputLabel value="#{bundle.CreateMovieLabel_genre}" for="genre" />
+                    <h:inputText id="genre" value="#{movieController.selected.genre}" title="#{bundle.CreateMovieTitle_genre}" />
+                    <h:outputLabel value="#{bundle.CreateMovieLabel_rating}" for="rating" />
+                    <h:inputText id="rating" value="#{movieController.selected.rating}" title="#{bundle.CreateMovieTitle_rating}" />
+                </h:panelGrid>
+                <br />
+                <h:commandLink action="#{movieController.create}" value="#{bundle.CreateMovieSaveLink}" />
+                <br />
+                <br />
+                <h:commandLink action="#{movieController.prepareList}" value="#{bundle.CreateMovieShowAllLink}" immediate="true"/>
+                <br />
+                <br />
+                <h:commandLink value="#{bundle.CreateMovieIndexLink}" action="/index" immediate="true" />
+            </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Edit.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Edit.xhtml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Edit.xhtml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/Edit.xhtml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+
+    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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+    <ui:composition template="/template.xhtml">
+        <ui:define name="title">
+            <h:outputText value="#{bundle.EditMovieTitle}"></h:outputText>
+        </ui:define>
+        <ui:define name="body">
+            <h:panelGroup id="messagePanel" layout="block">
+                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+            </h:panelGroup>
+            <h:form>
+                <h:panelGrid columns="2">
+                    <h:outputLabel value="#{bundle.EditMovieLabel_id}" for="id" />
+                    <h:inputText id="id" value="#{movieController.selected.id}" title="#{bundle.EditMovieTitle_id}" />
+                    <h:outputLabel value="#{bundle.EditMovieLabel_director}" for="director" />
+                    <h:inputText id="director" value="#{movieController.selected.director}" title="#{bundle.EditMovieTitle_director}" />
+                    <h:outputLabel value="#{bundle.EditMovieLabel_title}" for="title" />
+                    <h:inputText id="title" value="#{movieController.selected.title}" title="#{bundle.EditMovieTitle_title}" />
+                    <h:outputLabel value="#{bundle.EditMovieLabel_year}" for="year" />
+                    <h:inputText id="year" value="#{movieController.selected.year}" title="#{bundle.EditMovieTitle_year}" />
+                    <h:outputLabel value="#{bundle.EditMovieLabel_genre}" for="genre" />
+                    <h:inputText id="genre" value="#{movieController.selected.genre}" title="#{bundle.EditMovieTitle_genre}" />
+                    <h:outputLabel value="#{bundle.EditMovieLabel_rating}" for="rating" />
+                    <h:inputText id="rating" value="#{movieController.selected.rating}" title="#{bundle.EditMovieTitle_rating}" />
+                </h:panelGrid>
+                <h:commandLink action="#{movieController.update}" value="#{bundle.EditMovieSaveLink}"/>
+                <br />
+                <br />
+                <h:commandLink action="View" value="#{bundle.EditMovieViewLink}" immediate="true"/>
+                <br />
+                <h:commandLink action="#{movieController.prepareList}" value="#{bundle.EditMovieShowAllLink}" immediate="true"/>
+                <br />
+                <br />
+                <h:commandLink value="#{bundle.EditMovieIndexLink}" action="/index" immediate="true" />
+            </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/List.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/List.xhtml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/List.xhtml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/List.xhtml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+
+    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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+    <ui:composition template="/template.xhtml">
+        <ui:define name="title">
+            <h:outputText value="#{bundle.ListMovieTitle}"></h:outputText>
+        </ui:define>
+        <ui:define name="body">
+        <h:form styleClass="jsfcrud_list_form">
+            <h:panelGroup id="messagePanel" layout="block">
+                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+            </h:panelGroup>
+            <h:outputText escape="false" value="#{bundle.ListMovieEmpty}" rendered="#{movieController.items.rowCount == 0}"/>
+            <h:panelGroup rendered="#{movieController.items.rowCount > 0}">
+                <h:outputText value="#{movieController.pagination.pageFirstItem + 1}..#{movieController.pagination.pageLastItem + 1}/#{movieController.pagination.itemsCount}"/>&nbsp;
+                <h:commandLink action="#{movieController.previous}" value="#{bundle.Previous} #{movieController.pagination.pageSize}" rendered="#{movieController.pagination.hasPreviousPage}"/>&nbsp;
+                <h:commandLink action="#{movieController.next}" value="#{bundle.Next} #{movieController.pagination.pageSize}" rendered="#{movieController.pagination.hasNextPage}"/>&nbsp;
+                <h:dataTable value="#{movieController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="#{bundle.ListMovieTitle_id}"/>
+                        </f:facet>
+                        <h:outputText value="#{item.id}"/>
+                    </h:column>
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="#{bundle.ListMovieTitle_director}"/>
+                        </f:facet>
+                        <h:outputText value="#{item.director}"/>
+                    </h:column>
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="#{bundle.ListMovieTitle_title}"/>
+                        </f:facet>
+                        <h:outputText value="#{item.title}"/>
+                    </h:column>
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="#{bundle.ListMovieTitle_year}"/>
+                        </f:facet>
+                        <h:outputText value="#{item.year}"/>
+                    </h:column>
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="#{bundle.ListMovieTitle_genre}"/>
+                        </f:facet>
+                        <h:outputText value="#{item.genre}"/>
+                    </h:column>
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="#{bundle.ListMovieTitle_rating}"/>
+                        </f:facet>
+                        <h:outputText value="#{item.rating}"/>
+                    </h:column>
+                    <h:column>
+                        <f:facet name="header">
+                            <h:outputText value="&nbsp;"/>
+                        </f:facet>
+                        <h:commandLink action="#{movieController.prepareView}" value="#{bundle.ListMovieViewLink}"/>
+                        <h:outputText value=" "/>
+                        <h:commandLink action="#{movieController.prepareEdit}" value="#{bundle.ListMovieEditLink}"/>
+                        <h:outputText value=" "/>
+                        <h:commandLink action="#{movieController.destroy}" value="#{bundle.ListMovieDestroyLink}"/>
+                    </h:column>
+                </h:dataTable>
+            </h:panelGroup>
+            <br />
+            <h:commandLink action="#{movieController.prepareCreate}" value="#{bundle.ListMovieCreateLink}"/>
+            <br />
+            <br />
+            <h:commandLink value="#{bundle.ListMovieIndexLink}" action="/index" immediate="true" />
+        </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>

Added: openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/View.xhtml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/View.xhtml?rev=1081213&view=auto
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/View.xhtml (added)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/app/src/main/webapp/movie/View.xhtml Sun Mar 13 20:03:59 2011
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+
+    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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+    <ui:composition template="/template.xhtml">
+        <ui:define name="title">
+            <h:outputText value="#{bundle.ViewMovieTitle}"></h:outputText>
+        </ui:define>
+        <ui:define name="body">
+            <h:panelGroup id="messagePanel" layout="block">
+                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+            </h:panelGroup>
+            <h:form>
+                <h:panelGrid columns="2">
+                    <h:outputText value="#{bundle.ViewMovieLabel_id}"/>
+                    <h:outputText value="#{movieController.selected.id}" title="#{bundle.ViewMovieTitle_id}"/>
+                    <h:outputText value="#{bundle.ViewMovieLabel_director}"/>
+                    <h:outputText value="#{movieController.selected.director}" title="#{bundle.ViewMovieTitle_director}"/>
+                    <h:outputText value="#{bundle.ViewMovieLabel_title}"/>
+                    <h:outputText value="#{movieController.selected.title}" title="#{bundle.ViewMovieTitle_title}"/>
+                    <h:outputText value="#{bundle.ViewMovieLabel_year}"/>
+                    <h:outputText value="#{movieController.selected.year}" title="#{bundle.ViewMovieTitle_year}"/>
+                    <h:outputText value="#{bundle.ViewMovieLabel_genre}"/>
+                    <h:outputText value="#{movieController.selected.genre}" title="#{bundle.ViewMovieTitle_genre}"/>
+                    <h:outputText value="#{bundle.ViewMovieLabel_rating}"/>
+                    <h:outputText value="#{movieController.selected.rating}" title="#{bundle.ViewMovieTitle_rating}"/>
+                </h:panelGrid>
+                <br />
+                <h:commandLink action="#{movieController.destroyAndView}" value="#{bundle.ViewMovieDestroyLink}"/>
+                <br />
+                <br />
+                <h:commandLink action="Edit" value="#{bundle.ViewMovieEditLink}"/>
+                <br />
+                <h:commandLink action="#{movieController.prepareCreate}" value="#{bundle.ViewMovieCreateLink}" />
+                <br />
+                <h:commandLink action="#{movieController.prepareList}" value="#{bundle.ViewMovieShowAllLink}"/>
+                <br />
+                <br />
+                <h:commandLink value="#{bundle.ViewMovieIndexLink}" action="/index" immediate="true" />
+
+            </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>