[seam-commits] Seam SVN: r14486 - in branches/community/Seam_2_3/examples-ee6: registration and 36 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Apr 3 09:51:04 EDT 2012


Author: maschmid
Date: 2012-04-03 09:51:03 -0400 (Tue, 03 Apr 2012)
New Revision: 14486

Added:
   branches/community/Seam_2_3/examples-ee6/registration/
   branches/community/Seam_2_3/examples-ee6/registration/pom.xml
   branches/community/Seam_2_3/examples-ee6/registration/readme.txt
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/pom.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/application/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/application/META-INF/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/application/META-INF/jboss-deployment-structure.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/pom.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/Register.java
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/RegisterAction.java
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/User.java
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/ejb-jar.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/persistence.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/seam.properties
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/selenium/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-ftest/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-ftest/testng.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/testng.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/WEB-INF/
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/WEB-INF/components.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/seam.properties
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/pom.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/components.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/faces-config.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/web.xml
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/index.html
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/register.xhtml
   branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/registered.xhtml
Log:
add registration example to the ee6 examples


Added: branches/community/Seam_2_3/examples-ee6/registration/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/pom.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+    <parent>
+        <artifactId>examples-ee6</artifactId>
+        <groupId>org.jboss.seam</groupId>
+        <version>2.3.0.Beta2-SNAPSHOT</version>
+    </parent>
+    
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.jboss.seam.examples-ee6</groupId>
+    <artifactId>registration</artifactId>
+    <packaging>pom</packaging>
+    <name>Registration Example (EE6)</name>
+  
+    <modules>
+        <module>registration-ejb</module>
+        <module>registration-web</module>
+        <module>registration-ear</module>
+        <module>registration-tests</module>
+    </modules>
+
+    <properties>
+        <example.name>registration</example.name>
+    </properties>
+    
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                <artifactId>registration-ejb</artifactId>
+                <version>${project.version}</version>
+                <type>ejb</type>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                <artifactId>registration-web</artifactId>
+                <version>${project.version}</version>
+                <type>war</type>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                <artifactId>registration-ear</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+</project>

Added: branches/community/Seam_2_3/examples-ee6/registration/readme.txt
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/readme.txt	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/readme.txt	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,29 @@
+Seam Registration Example
+=========================
+
+This is a trivial example for the Seam tutorial. It runs on both JBoss AS as an
+EAR and Tomcat with Embedded JBoss as a WAR.
+
+To deploy the example to JBossAS 4, JBossAS 5 or JBossAS 6, follow these steps:
+
+* In the example root directory run:
+
+    mvn clean package
+
+* Set JBOSS_HOME environment property.
+
+* In the registration-ear directory run:
+
+    mvn jboss:hard-deploy
+
+* Open this URL in a web browser: http://localhost:8080/seam-registration
+
+To deploy the example to Tomcat with Embedded JBoss, follow these steps:
+
+* In the example root directory run:
+
+    mvn clean package -Ptomcat
+
+* Deploy the resulting war from registration-web/target directory to Tomcat manually.
+
+* Open this URL in a web browser: http://localhost:8080/jboss-seam-registration

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ear/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ear/pom.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+        <artifactId>registration</artifactId>
+        <groupId>org.jboss.seam.examples-ee6</groupId>
+        <version>2.3.0.Beta2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+    <artifactId>registration-ear</artifactId>
+    <packaging>ear</packaging>
+    <name>Registration EAR Module (EE6)</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+            <artifactId>registration-web</artifactId>
+            <type>war</type>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+            <artifactId>registration-ejb</artifactId>
+            <type>ejb</type>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam</artifactId>
+            <type>ejb</type>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>seam-registration</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-ear-plugin</artifactId>
+                <configuration>
+                    <version>6</version>
+                    <defaultLibBundleDir>lib</defaultLibBundleDir>
+                    <!-- Exclude eclipse generated application.xml and manually modified jboss-app.xml during mvn build  -->
+                    <earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
+                    <!-- use maven generated application.xml instead -->
+                    <generateApplicationXml>true</generateApplicationXml>
+                    <modules>
+                        <webModule>
+                            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                            <artifactId>registration-web</artifactId>
+                            <contextRoot>/seam-registration</contextRoot>
+                            <bundleFileName>registration-web.war</bundleFileName>
+                        </webModule>
+                        <ejbModule>
+                            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                            <artifactId>registration-ejb</artifactId>
+                            <bundleFileName>registration-ejb.jar</bundleFileName>
+                        </ejbModule>
+                        <ejbModule>
+                            <groupId>org.jboss.seam</groupId>
+                            <artifactId>jboss-seam</artifactId>
+                            <bundleFileName>jboss-seam.jar</bundleFileName>
+                        </ejbModule>
+                    </modules>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>exploded</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                                            <artifactId>registration-ear</artifactId>
+                                            <type>ear</type>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                                            <artifactId>registration-web</artifactId>
+                                            <type>war</type>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-web.war</outputDirectory>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                                            <artifactId>registration-ejb</artifactId>
+                                            <type>jar</type>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-ejb.jar</outputDirectory>
+                                        </artifactItem>
+                                    </artifactItems>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    
+</project>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/application/META-INF/jboss-deployment-structure.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ear/src/main/application/META-INF/jboss-deployment-structure.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,9 @@
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
+  <deployment>
+  	  <dependencies>
+          <module name="org.dom4j" export="true"/>
+          <module name="org.apache.commons.collections" export="true"/>
+	      <module name="javax.faces.api" export="true"/>
+	    </dependencies>
+  </deployment>  
+</jboss-deployment-structure> 

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/pom.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+        <artifactId>registration</artifactId>
+        <groupId>org.jboss.seam.examples-ee6</groupId>
+        <version>2.3.0.Beta2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+    <artifactId>registration-ejb</artifactId>
+    <packaging>ejb</packaging>
+    <name>Registration EJB Module (EE6)</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam</artifactId>
+            <type>ejb</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.testng</groupId>
+                    <artifactId>testng</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>   
+                <exclusion>
+                    <groupId>org.jboss.spec.javax.faces</groupId>
+                    <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+                </exclusion>   
+                <exclusion>
+                    <groupId>javax.el</groupId>
+                    <artifactId>el-api</artifactId>
+                </exclusion>  
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.0-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.spec.javax.ejb</groupId>
+            <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.spec.javax.faces</groupId>
+            <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+   </dependencies>
+   
+</project>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/Register.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/Register.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/Register.java	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,10 @@
+//$Id: Register.java 2056 2006-09-28 00:36:56Z gavin $
+package org.jboss.seam.example.registration;
+
+import javax.ejb.Local;
+
+ at Local
+public interface Register
+{
+   public String register();
+}
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/RegisterAction.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/RegisterAction.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/RegisterAction.java	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,48 @@
+//$Id: RegisterAction.java 10428 2009-04-15 21:54:38Z norman.richards at jboss.com $
+package org.jboss.seam.example.registration;
+
+import java.util.List;
+
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.log.Log;
+
+ at Stateless
+ at Name("register")
+public class RegisterAction implements Register
+{
+
+   @In
+   private User user;
+   
+   @PersistenceContext
+   private EntityManager em;
+   
+   @Logger
+   private static Log log;
+   
+   public String register()
+   {
+      List existing = em.createQuery("select u.username from User u where u.username=#{user.username}")
+         .getResultList();
+      
+      if ( existing.size()==0 )
+      {
+         em.persist(user);
+         log.info("Registered new user #{user.username}");
+         return "/registered.xhtml";
+      }
+      else
+      {
+         FacesMessages.instance().add("User #{user.username} already exists");
+         return null;
+      }
+   }
+
+}

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/User.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/User.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/java/org/jboss/seam/example/registration/User.java	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,76 @@
+//$Id: User.java 2360 2006-10-25 20:17:46Z gavin $
+package org.jboss.seam.example.registration;
+
+import static org.jboss.seam.ScopeType.SESSION;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.validation.constraints.Size;
+import javax.validation.constraints.NotNull;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+ at Entity
+ at Name("user")
+ at Scope(SESSION)
+ at Table(name="users")
+public class User implements Serializable
+{
+   private static final long serialVersionUID = 1881413500711441951L;
+   
+   private String username;
+   private String password;
+   private String name;
+   
+   public User(String name, String password, String username)
+   {
+      this.name = name;
+      this.password = password;
+      this.username = username;
+   }
+   
+   public User() {}
+   
+   @NotNull
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   @NotNull @Size(min=5, max=15)
+   public String getPassword()
+   {
+      return password;
+   }
+
+   public void setPassword(String password)
+   {
+      this.password = password;
+   }
+   
+   @Id @NotNull @Size(min=5, max=15)
+   public String getUsername()
+   {
+      return username;
+   }
+
+   public void setUsername(String username)
+   {
+      this.username = username;
+   }
+   
+   @Override
+   public String toString() 
+   {
+      return "User(" + username + ")";
+   }
+}

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/ejb-jar.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/ejb-jar.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar 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/ejb-jar_3_0.xsd"
+         version="3.0">
+         
+   <interceptors>
+     <interceptor>
+       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+     </interceptor>
+   </interceptors>
+   
+   <assembly-descriptor>
+      <interceptor-binding>
+         <ejb-name>*</ejb-name>
+         <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+      </interceptor-binding>
+   </assembly-descriptor>
+   
+</ejb-jar>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/persistence.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/META-INF/persistence.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
+             version="1.0">
+             
+   <persistence-unit name="userDatabase">
+      <provider>org.hibernate.ejb.HibernatePersistence</provider>
+      <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+   
+</persistence>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-ejb/src/main/resources/seam.properties
===================================================================
Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+        <artifactId>registration</artifactId>
+        <groupId>org.jboss.seam.examples-ee6</groupId>
+        <version>2.3.0.Beta2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+    <artifactId>registration-tests</artifactId>
+    <name>Registration Integration Tests Module (EE6)</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <classifier>jdk15</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+            <artifactId>registration-ejb</artifactId>
+            <type>ejb</type>
+            <scope>test</scope>
+        </dependency>        
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam</artifactId>
+            <type>ejb</type>
+            <scope>test</scope>
+        </dependency>        
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.javax.persistence</groupId>
+            <artifactId>hibernate-jpa-2.0-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.spec.javax.faces</groupId>
+            <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.seleniumhq.selenium.server</groupId>
+            <artifactId>selenium-server</artifactId>
+            <classifier>standalone</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+            <artifactId>selenium-java-client-driver</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>functional-tests</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>     
+    </build>    
+
+    <profiles>
+        <profile>
+            <id>ftest-jbossas</id>
+            <properties>
+                <example.context.path>seam-registration</example.context.path>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>selenium-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>failsafe-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>ftest-tomcat</id>
+            <properties>
+                <example.context.path>jboss-seam-registration</example.context.path>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>selenium-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>failsafe-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    
+</project>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,107 @@
+//$Id: RegisterTest.java 10428 2009-04-15 21:54:38Z norman.richards at jboss.com $
+package org.jboss.seam.example.registration.test;
+
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.mock.SeamTest;
+import org.testng.annotations.Test;
+import org.junit.Ignore;
+
+ at Ignore
+public class RegisterTest extends SeamTest
+{
+   
+   @Test
+   public void testLogin() throws Exception
+   {
+            
+      new FacesRequest("/register.xhtml") {
+
+         @Override
+         protected void processValidations() throws Exception
+         {
+            validateValue("#{user.username}", "1ovthafew");
+            validateValue("#{user.name}", "Gavin King");
+            validateValue("#{user.password}", "secret");
+            assert !isValidationFailure();
+         }
+         
+         @Override
+         protected void updateModelValues() throws Exception
+         {
+            setValue("#{user.username}", "1ovthafew");
+            setValue("#{user.name}", "Gavin King");
+            setValue("#{user.password}", "secret");
+         }
+
+         @Override
+         protected void invokeApplication()
+         {
+            assert invokeMethod("#{register.register}").equals("/registered.xhtml");
+            setOutcome("/registered.xhtml");
+         }
+         
+         @Override
+         protected void afterRequest()
+         {
+            assert isInvokeApplicationComplete();
+            assert !isRenderResponseBegun();
+         }
+         
+      }.run();
+      
+      new NonFacesRequest("/registered.xhtml")
+      {
+
+         @Override
+         protected void renderResponse()
+         {
+            assert getValue("#{user.username}").equals("1ovthafew");
+            assert getValue("#{user.password}").equals("secret");
+            assert getValue("#{user.name}").equals("Gavin King");
+         }
+         
+      }.run();
+      
+      new FacesRequest("/register.xhtml") {
+
+         @Override
+         protected void processValidations() throws Exception
+         {
+            validateValue("#{user.username}", "1ovthafew");
+            validateValue("#{user.name}", "Gavin A King");
+            validateValue("#{user.password}", "password");
+         }
+         
+         @Override
+         protected void updateModelValues() throws Exception
+         {
+            setValue("#{user.username}", "1ovthafew");
+            setValue("#{user.name}", "Gavin A King");
+            setValue("#{user.password}", "password");
+         }
+
+         @Override
+         protected void invokeApplication()
+         {
+            assert invokeMethod("#{register.register}")==null;
+         }
+         
+         @Override
+         protected void renderResponse() throws Exception
+         {
+            assert FacesContext.getCurrentInstance().getMessages().hasNext();
+         }
+         
+         @Override
+         protected void afterRequest()
+         {
+            assert isInvokeApplicationComplete();
+            assert isRenderResponseComplete();
+         }
+         
+      }.run();
+      
+   }
+   
+}

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.registration.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * This class tests registration form functionality in registration example.
+ * 
+ * @author Jozef Hartinger
+ * 
+ */
+public class RegistrationTest extends SeamSeleniumTest
+{
+   protected static String REGISTRATION_URL = "/register.seam";
+   protected static String REGISTRATION_USERNAME = "registration:username";
+   protected static String REGISTRATION_NAME = "registration:name";
+   protected static String REGISTRATION_PASSWORD = "registration:password";
+   protected static String REGISTRATION_SUBMIT = "registration:register";
+   protected static String REGISTRATION_MESSAGE = "registration:messages";
+   protected static String REGISTRATION_MESSAGE_COUNT = "//ul[@id='registration:messages']/li";
+   protected static String REGISTERED_URL = "/registered.seam";
+
+   @Override
+   @BeforeMethod
+   public void setUp()
+   {
+      super.setUp();
+      browser.open(CONTEXT_PATH + REGISTRATION_URL);
+   }
+
+   @Test
+   public void simpleRegistrationTest()
+   {
+      String username = "johny";
+      String name = "John Doe";
+      String password = "secretPassword";
+      submitRegistrationForm(username, name, password);
+      assertTrue("After-registration page expected.", browser.getLocation().contains(REGISTERED_URL));
+      assertTrue("Welcome message should contain username.", browser.isTextPresent(username));
+      assertTrue("Welcome message should contain name.", browser.isTextPresent(name));
+   }
+
+   @Test(dependsOnMethods = { "simpleRegistrationTest" })
+   public void duplicateUsernameTest()
+   {
+      String username = "jane";
+      String name = "Jane Doe";
+      String password = "secretPassword";
+      submitRegistrationForm(username, name, password);
+      browser.goBackAndWait();
+      submitRegistrationForm(username, name, password);
+      assertTrue("Registration page expected.", browser.getLocation().contains(REGISTRATION_URL));
+      assertTrue("Error message did not appear.", browser.isElementPresent(REGISTRATION_MESSAGE));
+   }
+
+   @Test
+   public void emptyValuesTest()
+   {
+      submitRegistrationForm("", "", "");
+      assertTrue("Registration page expected.", browser.getLocation().contains(REGISTRATION_URL));
+      assertEquals("Unexpected number of error messages.", 3, browser.getXpathCount(REGISTRATION_MESSAGE_COUNT));
+   }
+
+   protected void submitRegistrationForm(String username, String name, String password)
+   {
+      browser.type(REGISTRATION_USERNAME, username);
+      browser.type(REGISTRATION_NAME, name);
+      browser.type(REGISTRATION_PASSWORD, password);
+      browser.clickAndWait(REGISTRATION_SUBMIT);
+   }
+
+}

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/WEB-INF/components.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/WEB-INF/components.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:core="http://jboss.com/products/seam/core"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation=
+                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd 
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+
+    <core:init jndi-pattern="#{ejbName}/local"/>
+
+</components>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/seam.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/seam.properties	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources/seam.properties	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,3 @@
+#debug is explicitly disabled in test to avoid JBIDE-3623
+#Thu Dec 31 16:24:37 CET 2009
+org.jboss.seam.core.init.debug=false

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-ftest/testng.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-ftest/testng.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,27 @@
+
+	<!--
+		JBoss, Home of Professional Open Source Copyright 2008, Red Hat
+		Middleware LLC, and individual contributors by the @authors tag. See
+		the copyright.txt in the distribution for a full listing of individual
+		contributors. This is free software; you can redistribute it and/or
+		modify it under the terms of the GNU Lesser General Public License as
+		published by the Free Software Foundation; either version 2.1 of the
+		License, or (at your option) any later version. This software is
+		distributed in the hope that it will be useful, but WITHOUT ANY
+		WARRANTY; without even the implied warranty of MERCHANTABILITY or
+		FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+		License for more details. You should have received a copy of the GNU
+		Lesser General Public License along with this software; if not, write
+		to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+		Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+	--> 
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Registration example" verbose="2" parallel="false">
+	<test name="registration_jboss5">
+		<parameter name="PROPERTY_FILE" value="" />
+		<classes>
+			<class
+				name="org.jboss.seam.example.registration.test.selenium.RegistrationTest" />
+		</classes>
+	</test>
+</suite>


Property changes on: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-ftest/testng.xml
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/testng.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/testng.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,11 @@
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+
+<suite name="Registration" verbose="2" parallel="false">
+
+   <test name="Register">
+     <classes>
+       <class name="org.jboss.seam.example.registration.test.RegisterTest"/>
+     </classes>
+   </test>
+	
+</suite>
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/pom.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+        <artifactId>registration</artifactId>
+        <groupId>org.jboss.seam.examples-ee6</groupId>
+        <version>2.3.0.Beta2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+    <artifactId>registration-web</artifactId>
+    <packaging>war</packaging>
+    <name>Registration Web Module (EE6)</name>
+    
+    <properties>
+        <!-- filtering property for components.xml -->
+        <jndiPattern>java:app/registration-ejb/#{ejbName}</jndiPattern>
+    </properties>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+            <artifactId>registration-ejb</artifactId>
+            <type>ejb</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam</artifactId>
+            <type>ejb</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam-ui</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.jboss.seam</groupId>
+                    <artifactId>jboss-seam-jul</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-collections</groupId>
+                    <artifactId>commons-collections</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+        </dependency>
+    </dependencies>
+  
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <webResources>
+                        <resource>
+                            <directory>src/main/webapp</directory>
+                            <filtering>true</filtering>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+  
+    <profiles>
+        <profile>
+            <id>tomcat</id>
+            <properties>
+                <!-- filtering property for components.xml -->
+                <jndiPattern>#{ejbName}/local</jndiPattern>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.seam.examples-ee6.registration</groupId>
+                    <artifactId>registration-ejb</artifactId>
+                    <type>ejb</type>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>javax.faces</groupId>
+                    <artifactId>jsf-api</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>javax.faces</groupId>
+                    <artifactId>jsf-impl</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.jboss.seam</groupId>
+                    <artifactId>jboss-seam</artifactId>
+                    <type>ejb</type>
+                    <scope>compile</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>com.thoughtworks.xstream</groupId>
+                            <artifactId>xstream</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>xpp3</groupId>
+                            <artifactId>xpp3_min</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+            <build>
+                <finalName>jboss-seam-registration</finalName>
+            </build>
+        </profile>
+    </profiles>
+</project>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/components.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/components.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:core="http://jboss.com/products/seam/core"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation=
+                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd 
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+
+    <core:init jndi-pattern="@jndiPattern@"/>
+    
+</components>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/faces-config.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="2.1"
+              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_1.xsd">
+        
+</faces-config>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/WEB-INF/web.xml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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">
+
+    <!-- Seam -->
+    
+    <listener>
+        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+    </listener>
+
+    <context-param>
+        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+        <param-value>.xhtml</param-value>
+    </context-param>
+  
+    <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>*.seam</url-pattern>
+    </servlet-mapping>
+    
+    <session-config>
+        <session-timeout>10</session-timeout> 
+    </session-config> 	
+    
+</web-app>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/index.html
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/index.html	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/index.html	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,5 @@
+<html>
+<head>
+  <meta http-equiv="Refresh" content="0; URL=register.seam">
+</head>
+</html>
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/register.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/register.xhtml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/register.xhtml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,28 @@
+<?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">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:s="http://jboss.com/products/seam/taglib"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+   <head>
+      <title>Register New User</title>
+   </head>
+   <body>
+      <f:view>
+         <h:form id="registration">
+            <s:validateAll>
+               <h:panelGrid columns="2">
+                  Username: <h:inputText id="username" value="#{user.username}" required="true"/>
+                  Real Name: <h:inputText id="name" value="#{user.name}" required="true"/>
+                  Password: <h:inputSecret id="password" value="#{user.password}" required="true"/>
+               </h:panelGrid>
+            </s:validateAll>
+            <h:messages id="messages"/>
+            <h:commandButton id="register" value="Register" action="#{register.register}"/>
+         </h:form>
+      </f:view>
+   </body>
+
+</html>

Added: branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/registered.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/registered.xhtml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-web/src/main/webapp/registered.xhtml	2012-04-03 13:51:03 UTC (rev 14486)
@@ -0,0 +1,16 @@
+<?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">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+   <head>
+      <title>Successfully Registered New User</title>
+   </head>
+   <body>
+      <f:view>
+         Welcome, #{user.name}, you are successfully registered as #{user.username}.
+      </f:view>
+   </body>
+
+</html>



More information about the seam-commits mailing list