[seam-commits] Seam SVN: r14311 - in branches/community/Seam_2_3/examples-ee6: messages and 32 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Feb 9 11:47:47 EST 2012


Author: dhinojosa
Date: 2012-02-09 11:47:46 -0500 (Thu, 09 Feb 2012)
New Revision: 14311

Added:
   branches/community/Seam_2_3/examples-ee6/messages/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/Message.java
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManager.java
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManagerBean.java
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/ejb-jar.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/persistence.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/import.sql
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/seam.properties
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/components.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/web.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/index.html
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/messages.jsp
   branches/community/Seam_2_3/examples-ee6/messages/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/readme.txt
Log:
added messages


Property changes on: branches/community/Seam_2_3/examples-ee6/messages
___________________________________________________________________
Added: svn:ignore
   + target
*.iml



Property changes on: branches/community/Seam_2_3/examples-ee6/messages/messages-ear
___________________________________________________________________
Added: svn:ignore
   + *.iml
target


Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,179 @@
+<?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>messages</artifactId>
+        <groupId>org.jboss.seam.examples</groupId>
+        <version>2.3.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples</groupId>
+    <artifactId>messages-ear</artifactId>
+    <packaging>ear</packaging>
+    <name>Messages EAR Module (EE6)</name>
+    
+    <properties>
+        <jboss.home>${env.JBOSS_HOME}</jboss.home>
+        <jboss.domain>default</jboss.domain>
+    </properties>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.seam.examples</groupId>
+            <artifactId>messages-web</artifactId>
+            <type>war</type>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam.examples</groupId>
+            <artifactId>messages-ejb</artifactId>
+            <type>ejb</type>
+        </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>seam-messages</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-ear-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <version>5</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>
+                    <filtering>true</filtering>
+                    <jboss>
+                        <version>4.2</version>
+                        <loader-repository>seam.jboss.org:loader=seam-messages</loader-repository>
+                    </jboss>
+                    <modules>
+                        <webModule>
+                            <groupId>org.jboss.seam.examples</groupId>
+                            <artifactId>messages-web</artifactId>
+                            <contextRoot>/seam-messages</contextRoot>
+                            <bundleFileName>messages-web.war</bundleFileName>
+                        </webModule>
+                        <ejbModule>
+                            <groupId>org.jboss.seam.examples</groupId>
+                            <artifactId>messages-ejb</artifactId>
+                            <bundleFileName>messages-ejb.jar</bundleFileName>
+                        </ejbModule>
+                    </modules>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.jboss.as.plugins</groupId>
+                <artifactId>jboss-as-maven-plugin</artifactId>
+                <version>7.1.0.CR1b</version>
+                <executions>
+                    <!-- This requires to be enabled manually as <enabled>true</enabled> doesn't
+                             work -->
+                    <!-- <execution> -->
+                    <!-- <id>add-datasource</id> -->
+                    <!-- <phase>package</phase> -->
+                    <!-- <configuration> -->
+                    <!-- <address>subsystem=datasources,data-source=java:/bookingDatasource</address> -->
+                    <!-- <properties> -->
+                    <!-- <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url> -->
+                    <!-- <jndi-name>java:/bookingDatasource</jndi-name> -->
+                    <!-- <enabled>true</enabled> -->
+                    <!-- <pool-name>bookingDSPool</pool-name> -->
+                    <!-- <user-name>sa</user-name> -->
+                    <!-- <driver-name>h2</driver-name> -->
+                    <!-- </properties> -->
+                    <!-- </configuration> -->
+                    <!-- <goals> -->
+                    <!-- <goal>add-resource</goal> -->
+                    <!-- </goals> -->
+                    <!-- </execution> -->
+                    <!-- Datasource has to be created before running deploy -->
+                    <execution>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>deploy</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </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</groupId>
+                                            <artifactId>messages-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</groupId>
+                                            <artifactId>messages-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</groupId>
+                                            <artifactId>messages-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>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>jboss-maven-plugin</artifactId>
+                        <configuration>
+                            <jbossHome>${jboss.home}</jbossHome>
+                            <serverName>${jboss.domain}</serverName>
+                            <fileNames>
+                                <directory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</directory>
+                            </fileNames>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>


Property changes on: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb
___________________________________________________________________
Added: svn:ignore
   + target
*.iml


Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,50 @@
+<?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>messages</artifactId>
+        <groupId>org.jboss.seam.examples</groupId>
+        <version>2.3.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples</groupId>
+    <artifactId>messages-ejb</artifactId>
+    <packaging>ejb</packaging>
+    <name>Messages EJB Module (EE6)</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam</artifactId>
+            <type>ejb</type>
+        </dependency>
+        <dependency>
+            <groupId>javax.persistence</groupId>
+            <artifactId>persistence-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.ejb</groupId>
+            <artifactId>ejb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.faces</groupId>
+            <artifactId>jsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+                <artifactId>hibernate-validator</artifactId>
+                <exclusions>
+                    <exclusion>
+                        <groupId>commons-collections</groupId>
+                        <artifactId>commons-collections</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+    </dependencies>
+</project>

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/Message.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/Message.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/Message.java	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,74 @@
+//$Id: Message.java 902 2006-01-13 14:19:20Z theute $
+package org.jboss.seam.example.messages;
+
+import static org.jboss.seam.ScopeType.EVENT;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Basic;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotNull;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+ at Entity
+ at Name("message")
+ at Scope(EVENT)
+public class Message implements Serializable
+{
+   private Long id;
+   private String title;
+   private String text;
+   private boolean read;
+   private Date datetime;
+   
+   @Id @GeneratedValue
+   public Long getId() {
+      return id;
+   }
+   public void setId(Long id) {
+      this.id = id;
+   }
+   
+   @NotNull @Length(max=100)
+   public String getTitle() {
+      return title;
+   }
+   public void setTitle(String title) {
+      this.title = title;
+   }
+   
+   @NotNull @Lob
+   public String getText() {
+      return text;
+   }
+   public void setText(String text) {
+      this.text = text;
+   }
+   
+   @NotNull
+   public boolean isRead() {
+      return read;
+   }
+   public void setRead(boolean read) {
+      this.read = read;
+   }
+   
+   @NotNull 
+   @Basic @Temporal(TemporalType.TIMESTAMP)
+   public Date getDatetime() {
+      return datetime;
+   }
+   public void setDatetime(Date datetime) {
+      this.datetime = datetime;
+   }
+   
+}

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManager.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManager.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManager.java	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,13 @@
+//$Id: MessageManager.java 1584 2006-05-23 05:30:24Z gavin $
+package org.jboss.seam.example.messages;
+
+import javax.ejb.Local;
+
+ at Local
+public interface MessageManager
+{
+   public void findMessages();
+   public void select();
+   public void delete();
+   public void destroy();
+}
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManagerBean.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManagerBean.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/MessageManagerBean.java	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,63 @@
+//$Id: MessageManagerBean.java 2711 2006-11-19 21:01:33Z gavin $
+package org.jboss.seam.example.messages;
+
+import static javax.persistence.PersistenceContextType.EXTENDED;
+import static org.jboss.seam.ScopeType.SESSION;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+
+ at Stateful
+ at Scope(SESSION)
+ at Name("messageManager")
+public class MessageManagerBean implements Serializable, MessageManager
+{
+
+   @DataModel
+   private List<Message> messageList;
+   
+   @DataModelSelection
+   @Out(required=false)
+   private Message message;
+   
+   @PersistenceContext(type=EXTENDED)
+   private EntityManager em;
+   
+   @Factory("messageList")
+   public void findMessages()
+   {
+      messageList = em.createQuery("select msg from Message msg order by msg.datetime desc").getResultList();
+   }
+   
+   public void select()
+   {
+      if (message!=null) message.setRead(true);
+   }
+   
+   public void delete()
+   {
+      if (message!=null)
+      {
+         messageList.remove(message);
+         em.remove(message);
+         message=null;
+      }
+   }
+   
+   @Remove @Destroy
+   public void destroy() {}
+
+}

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/ejb-jar.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/ejb-jar.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -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/messages/messages-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/persistence.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/persistence.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,13 @@
+<?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="messageDatabase">
+      <provider>org.hibernate.ejb.HibernatePersistence</provider>
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+	</persistence-unit>
+</persistence>

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/import.sql
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/import.sql	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/import.sql	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,2 @@
+insert into Message (title, text, read, datetime) values ('Hello World', 'This is an example of a message.', 0, '2006-01-01 11:12:00')
+insert into Message (title, text, read, datetime) values ('Greetings Earthling', 'This is another example of a message.', 0, '2006-02-04 03:04:00')

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/seam.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/seam.properties	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/seam.properties	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1 @@
+


Property changes on: branches/community/Seam_2_3/examples-ee6/messages/messages-tests
___________________________________________________________________
Added: svn:ignore
   + *.iml
target


Added: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,209 @@
+<?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>messages</artifactId>
+        <groupId>org.jboss.seam.examples</groupId>
+        <version>2.3.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples</groupId>
+    <artifactId>messages-tests</artifactId>
+    <name>Messages Integration Tests Module (EE6)</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.embedded</groupId>
+            <artifactId>jboss-embedded-all</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.jboss.microcontainer</groupId>
+                    <artifactId>jboss-deployers-client-spi</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.microcontainer</groupId>
+                    <artifactId>jboss-deployers-core-spi</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam.embedded</groupId>
+            <artifactId>thirdparty-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam.embedded</groupId>
+            <artifactId>hibernate-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <classifier>jdk15</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam.examples</groupId>
+            <artifactId>messages-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>javax.faces</groupId>
+            <artifactId>jsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</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>
+            <testResource>
+                <directory>src/test/bootstrap</directory>
+                <filtering>false</filtering>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>false</skipTests>
+                    <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true -Xms512m -Xmx512m</argLine>             
+                    <additionalClasspathElements>
+                        <additionalClasspathElement>${basedir}/../messages-web/src/main/webapp</additionalClasspathElement>
+                    </additionalClasspathElements>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>src/test/resources-integration/testng.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                       <id>copy-seam-bootstrap</id>
+                       <phase>process-resources</phase>
+                       <goals>
+                          <goal>unpack</goal>
+                       </goals>
+                       <configuration>
+                          <artifactItems>
+                              <artifactItem>
+                                   <groupId>org.jboss.seam</groupId>
+                                   <artifactId>jboss-embedded-bootstrap</artifactId>
+                                   <version>${project.version}</version>
+                                   <type>jar</type>
+                                   <overWrite>false</overWrite>
+                                   <outputDirectory>${basedir}/src/test</outputDirectory>
+                              </artifactItem>
+                          </artifactItems>
+                       </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <configuration>
+                    <filesets>
+                        <fileset>
+                            <directory>${basedir}/src/test/META-INF/</directory>
+                        </fileset>
+                        <fileset>
+                            <directory>${basedir}/src/test/bootstrap</directory>
+                        </fileset>
+                    </filesets>
+                </configuration>
+            </plugin>
+        </plugins>     
+    </build>    
+
+    <profiles>
+        <profile>
+            <id>ftest-jbossas</id>
+            <properties>
+                <example.context.path>seam-messages</example.context.path>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>jboss-maven-plugin</artifactId>
+                        <configuration>
+                            <jbossHome>${jboss.home}</jbossHome>
+                            <serverName>${jboss.domain}</serverName>
+                            <fileNames>
+                                <param>${basedir}/../messages-ear/target/seam-messages.ear</param>
+                            </fileNames>
+                        </configuration>
+                    </plugin>
+                    <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-messages</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/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,89 @@
+//$Id: MessageListTest.java 2383 2006-10-26 18:53:00Z gavin $
+package org.jboss.seam.example.messages.test;
+import javax.faces.model.DataModel;
+
+import org.jboss.seam.mock.SeamTest;
+import org.testng.annotations.Test;
+
+public class MessageListTest extends SeamTest
+{
+   @Test
+   public void testMessageList() throws Exception 
+   {
+      new NonFacesRequest()
+      {
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+         }
+         
+      }.run();
+
+      new FacesRequest()
+      {
+
+         @Override
+         protected void updateModelValues() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+            list.setRowIndex(1);
+         }
+         
+         
+         @Override
+         protected void invokeApplication() throws Exception {
+            invokeMethod("#{messageManager.select}");
+         }
+
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+            assert getValue("#{message.title}").equals("Hello World");
+            assert getValue("#{message.read}").equals(true);
+         }
+         
+      }.run();
+
+      new FacesRequest()
+      {
+
+         @Override
+         protected void updateModelValues() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==2;
+            list.setRowIndex(0);
+         }
+         
+         
+         @Override
+         protected void invokeApplication() throws Exception {
+            invokeMethod("#{messageManager.delete}");
+         }
+
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==1;
+         }
+         
+      }.run();
+
+      new NonFacesRequest()
+      {
+
+         @Override
+         protected void renderResponse() throws Exception {
+            DataModel list = (DataModel) getInstance("messageList");
+            assert list.getRowCount()==1;
+         }
+         
+      }.run();
+
+   }
+   
+}

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,83 @@
+/*
+ * 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.messages.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * Test for messages example
+ * @author Jozef Hartinger
+ *
+ */
+public class MessageTest extends SeamSeleniumTest
+{
+
+   public static final String MESSAGES_URL = "/messages.seam";
+   public static final String MESSAGES_LINK = "messages:{0}:link";
+   public static final String MESSAGES_DELETE = "messages:{0}:delete";
+   public static final String MESSAGES_CHECKBOX = "messages:{0}:read";
+   public static final String MESSAGES_COUNT = "//table[@id='messages']/tbody/tr";
+   public static final String MESSAGE_TITLE = "title";
+   public static final String MESSAGE_TEXT = "text";
+
+   @Override
+   @BeforeMethod
+   public void setUp()
+   {
+      super.setUp();
+      browser.open(CONTEXT_PATH + MESSAGES_URL);
+   }
+
+   @Test(dataProvider = "messages")
+   public void readMessageTest(int i, String title, String text)
+   {
+      browser.clickAndWait(MessageFormat.format(MESSAGES_LINK, i));
+      assertEquals("Unexpected message title displayed.", title, browser.getText(MESSAGE_TITLE));
+      assertEquals("Unexpected message text displayed.", text, browser.getText(MESSAGE_TEXT));
+      assertTrue("Checkbox should be checked after message is read.", browser.isChecked(MessageFormat.format(MESSAGES_CHECKBOX, i)));
+   }
+
+   @Test(dependsOnMethods = {"readMessageTest"}, dataProvider = "messages")
+   public void deleteMessageTest(int i, String title, String name)
+   {
+      int messageCount = browser.getXpathCount(MESSAGES_COUNT).intValue();
+      // delete first message in a table
+      browser.clickAndWait(MessageFormat.format(MESSAGES_DELETE, 0));
+      assertEquals("Unexpected count of messages.", --messageCount, browser.getXpathCount(MESSAGES_COUNT));
+      assertFalse("Message title still present.", browser.isTextPresent(title));
+   }
+
+   @DataProvider(name = "messages")
+   public Object[][] getMessages()
+   {
+      Object[][] messages = { { 0, "Greetings Earthling", "This is another example of a message." }, { 1, "Hello World", "This is an example of a message." } };
+      return messages;
+   }
+}

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+            
+    <component name="org.jboss.seam.core.init">
+        <property name="jndiPattern">#{ejbName}/local</property>
+    </component>
+
+</components>

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties	2012-02-09 16:47:46 UTC (rev 14311)
@@ -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/messages/messages-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,26 @@
+
+	<!--
+		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="Messages example" verbose="2" parallel="false">
+	<test name="messages_tests">
+		<parameter name="PROPERTY_FILE" value="" />
+		<classes>
+			<class name="org.jboss.seam.example.messages.test.selenium.MessageTest" />
+		</classes>
+	</test>
+</suite>


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

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,11 @@
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+
+<suite name="Messages" verbose="2" parallel="false">
+
+   <test name="MessageList">
+     <classes>
+       <class name="org.jboss.seam.example.messages.test.MessageListTest"/>
+     </classes>
+   </test>
+	
+</suite>
\ No newline at end of file


Property changes on: branches/community/Seam_2_3/examples-ee6/messages/messages-web
___________________________________________________________________
Added: svn:ignore
   + *.iml
target


Added: branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -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>messages</artifactId>
+        <groupId>org.jboss.seam.examples</groupId>
+        <version>2.3.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <groupId>org.jboss.seam.examples</groupId>
+    <artifactId>messages-web</artifactId>
+    <packaging>war</packaging>
+    <name>Messages Web Module (EE6)</name>
+
+    <properties>
+        <!-- filtering property for components.xml -->
+        <jndiPattern>seam-messages/#{ejbName}/local</jndiPattern>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.seam.examples</groupId>
+            <artifactId>messages-ejb</artifactId>
+            <type>ejb</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.seam</groupId>
+            <artifactId>jboss-seam</artifactId>
+            <type>ejb</type>
+        </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>javax.servlet</groupId>
+            <artifactId>jstl</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</groupId>
+                    <artifactId>messages-ejb</artifactId>
+                    <type>ejb</type>
+                    <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>
+                <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>
+            </dependencies>
+            <build>
+                <finalName>jboss-seam-messages</finalName>
+            </build>
+        </profile>
+    </profiles>
+
+</project>

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/components.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/components.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+            
+    <component name="org.jboss.seam.core.init">
+        <property name="jndiPattern">@jndiPattern@</property>
+    </component>
+
+</components>

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/web.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+    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_2_5.xsd">
+
+    <!-- Seam -->
+    
+    <listener>
+        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+    </listener>
+
+    <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/messages/messages-web/src/main/webapp/index.html
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/index.html	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/index.html	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,5 @@
+<html>
+<head>
+  <meta http-equiv="Refresh" content="0; URL=messages.seam">
+</head>
+</html>
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/messages.jsp
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/messages.jsp	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/messages.jsp	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,41 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s" %>
+<html>
+ <head>
+  <title>Messages</title>
+ </head>
+ <body>
+  <f:view>
+     <h2>Message List</h2>
+     <h:outputText id="noMessages" value="No messages to display" rendered="#{messageList.rowCount==0}"/>
+     <h:dataTable id="messages" var="msg" value="#{messageList}" rendered="#{messageList.rowCount>0}">
+        <h:column>
+           <f:facet name="header">
+              <h:outputText value="Read"/>
+           </f:facet>
+           <h:selectBooleanCheckbox id="read" value="#{msg.read}" disabled="true"/>
+        </h:column>
+        <h:column>
+           <f:facet name="header">
+              <h:outputText value="Title"/>
+           </f:facet>
+           <s:link id="link" value="#{msg.title}" action="#{messageManager.select}"/>
+        </h:column>
+        <h:column>
+           <f:facet name="header">
+              <h:outputText value="Date/Time"/>
+           </f:facet>
+           <h:outputText id="date" value="#{msg.datetime}">
+              <s:convertDateTime type="both" dateStyle="medium" timeStyle="short"/>
+           </h:outputText>
+        </h:column>
+        <h:column>
+           <s:button id="delete" value="Delete" action="#{messageManager.delete}"/>
+        </h:column>
+     </h:dataTable>
+     <h3><h:outputText id="title" value="#{message.title}"/></h3>
+     <div><h:outputText id="text" value="#{message.text}"/></div>
+  </f:view>
+ </body>
+</html>
\ No newline at end of file

Added: branches/community/Seam_2_3/examples-ee6/messages/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/pom.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,47 @@
+<?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-SNAPSHOT</version>
+    </parent>
+    
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.jboss.seam.examples</groupId>
+    <artifactId>messages</artifactId>
+    <packaging>pom</packaging>
+    <name>Messages Example (EE6)</name>
+  
+    <modules>
+        <module>messages-ejb</module>
+        <module>messages-web</module>
+        <module>messages-ear</module>
+        <module>messages-tests</module>
+    </modules>
+    
+    <properties>
+        <example.name>messages</example.name>
+    </properties>
+    
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.jboss.seam.examples</groupId>
+                <artifactId>messages-ejb</artifactId>
+                <version>${project.version}</version>
+                <type>ejb</type>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.seam.examples</groupId>
+                <artifactId>messages-web</artifactId>
+                <version>${project.version}</version>
+                <type>war</type>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.seam.examples</groupId>
+                <artifactId>messages-ear</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>

Added: branches/community/Seam_2_3/examples-ee6/messages/readme.txt
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/readme.txt	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/readme.txt	2012-02-09 16:47:46 UTC (rev 14311)
@@ -0,0 +1,30 @@
+Seam Message List Example
+=========================
+
+This is a simple example of the use of @DataModel for the Seam tutorial. 
+It runs on JBoss AS as an EAR and Tomcat with Embedded JBoss as a WAR.
+
+To deploy the example to JBossAS 5, follow these steps:
+
+* In the example root directory run:
+
+    mvn clean package
+
+* Set JBOSS_HOME environment property.
+
+* In the messages-ear directory run:
+
+    mvn jboss:hard-deploy
+
+* Open this URL in a web browser: http://localhost:8080/seam-messages
+
+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 messages-web/target directory to Tomcat manually.
+
+* Open this URL in a web browser: http://localhost:8080/jboss-seam-messages
+



More information about the seam-commits mailing list