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

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Feb 10 11:01:06 EST 2012


Author: manaRH
Date: 2012-02-10 11:01:03 -0500 (Fri, 10 Feb 2012)
New Revision: 14312

Added:
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/application/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/application/META-INF/
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/application/META-INF/jboss-deployment-structure.xml
Modified:
   branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml
   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/resources/META-INF/persistence.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
   branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml
   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/pom.xml
Log:
JBSEAM-4852 - messages example

Modified: branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ear/pom.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -3,12 +3,11 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <artifactId>messages</artifactId>
-        <groupId>org.jboss.seam.examples</groupId>
+        <groupId>org.jboss.seam.examples-ee6</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>
@@ -20,18 +19,18 @@
     
     <dependencies>
         <dependency>
-            <groupId>org.jboss.seam.examples</groupId>
+            <groupId>org.jboss.seam.examples-ee6</groupId>
             <artifactId>messages-web</artifactId>
             <type>war</type>
         </dependency>
         <dependency>
-            <groupId>org.jboss.seam.examples</groupId>
+            <groupId>org.jboss.seam.examples-ee6</groupId>
             <artifactId>messages-ejb</artifactId>
             <type>ejb</type>
         </dependency>
         <dependency>
             <groupId>org.jboss.seam</groupId>
-            <artifactId>jboss-seam</artifactId>
+            <artifactId>jboss-seam-jsf2</artifactId>
             <type>ejb</type>
             <scope>compile</scope>
             <exclusions>
@@ -53,31 +52,31 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-ear-plugin</artifactId>
-                <version>2.3.2</version>
                 <configuration>
-                    <version>5</version>
+                    <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>
                     <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>
+                            <groupId>org.jboss.seam.examples-ee6</groupId>
                             <artifactId>messages-web</artifactId>
                             <contextRoot>/seam-messages</contextRoot>
                             <bundleFileName>messages-web.war</bundleFileName>
                         </webModule>
                         <ejbModule>
-                            <groupId>org.jboss.seam.examples</groupId>
+                            <groupId>org.jboss.seam.examples-ee6</groupId>
                             <artifactId>messages-ejb</artifactId>
                             <bundleFileName>messages-ejb.jar</bundleFileName>
                         </ejbModule>
+                        <ejbModule>
+                            <groupId>org.jboss.seam</groupId>
+                            <artifactId>jboss-seam-jsf2</artifactId>
+                            <bundleFileName>jboss-seam.jar</bundleFileName>
+                        </ejbModule>
                     </modules>
                 </configuration>
             </plugin>
@@ -136,21 +135,21 @@
                                 <configuration>
                                     <artifactItems>
                                         <artifactItem>
-                                            <groupId>org.jboss.seam.examples</groupId>
+                                            <groupId>org.jboss.seam.examples-ee6</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>
+                                            <groupId>org.jboss.seam.examples-ee6</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>
+                                            <groupId>org.jboss.seam.examples-ee6</groupId>
                                             <artifactId>messages-ejb</artifactId>
                                             <type>jar</type>
                                             <overWrite>true</overWrite>

Added: branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/application/META-INF/jboss-deployment-structure.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ear/src/main/application/META-INF/jboss-deployment-structure.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -0,0 +1,12 @@
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
+  <deployment>
+      <dependencies>
+<!--           <module name="org.apache.log4j" export="true"/> -->
+          <module name="org.dom4j" export="true"/>
+<!--           <module name="org.apache.commons.logging" export="true"/> -->
+<!--           <module name="org.apache.commons.collections" export="true"/> -->
+          <module name="javax.faces.api" export="true"/>
+          <module name="com.sun.jsf-impl" export="true"/>
+        </dependencies>
+  </deployment>  
+</jboss-deployment-structure> 
\ No newline at end of file

Modified: branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/pom.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -3,12 +3,11 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <artifactId>messages</artifactId>
-        <groupId>org.jboss.seam.examples</groupId>
+        <groupId>org.jboss.seam.examples-ee6</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>
@@ -16,12 +15,13 @@
     <dependencies>
         <dependency>
             <groupId>org.jboss.seam</groupId>
-            <artifactId>jboss-seam</artifactId>
+            <artifactId>jboss-seam-jsf2</artifactId>
             <type>ejb</type>
         </dependency>
         <dependency>
             <groupId>javax.persistence</groupId>
             <artifactId>persistence-api</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
@@ -31,12 +31,9 @@
         <dependency>
             <groupId>javax.ejb</groupId>
             <artifactId>ejb-api</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>javax.faces</groupId>
-            <artifactId>jsf-api</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.hibernate</groupId>
                 <artifactId>hibernate-validator</artifactId>
                 <exclusions>
@@ -45,6 +42,7 @@
                         <artifactId>commons-collections</artifactId>
                     </exclusion>
                 </exclusions>
-            </dependency>
+                <scope>provided</scope>
+        </dependency>
     </dependencies>
 </project>

Modified: 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	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/java/org/jboss/seam/example/messages/Message.java	2012-02-10 16:01:03 UTC (rev 14312)
@@ -9,13 +9,14 @@
 import javax.persistence.Basic;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Lob;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
 
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Scope;
 
@@ -24,13 +25,16 @@
 @Scope(EVENT)
 public class Message implements Serializable
 {
+
+   private static final long serialVersionUID = -3304996108743093764L;
+   
    private Long id;
    private String title;
    private String text;
    private boolean read;
    private Date datetime;
    
-   @Id @GeneratedValue
+   @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
    public Long getId() {
       return id;
    }
@@ -38,7 +42,7 @@
       this.id = id;
    }
    
-   @NotNull @Length(max=100)
+   @NotNull @Size(max=100)
    public String getTitle() {
       return title;
    }

Modified: 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	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-ejb/src/main/resources/META-INF/persistence.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -5,7 +5,7 @@
              version="1.0">
 	<persistence-unit name="messageDatabase">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
-      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
       <properties>
          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
       </properties>

Modified: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -3,12 +3,12 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <artifactId>messages</artifactId>
-        <groupId>org.jboss.seam.examples</groupId>
+        <groupId>org.jboss.seam.examples-ee6</groupId>
         <version>2.3.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     
-    <groupId>org.jboss.seam.examples</groupId>
+    <groupId>org.jboss.seam.examples-ee6</groupId>
     <artifactId>messages-tests</artifactId>
     <name>Messages Integration Tests Module (EE6)</name>
     
@@ -41,7 +41,7 @@
             <classifier>jdk15</classifier>
         </dependency>
         <dependency>
-            <groupId>org.jboss.seam.examples</groupId>
+            <groupId>org.jboss.seam.examples-ee6</groupId>
             <artifactId>messages-ejb</artifactId>
             <type>ejb</type>
             <scope>test</scope>

Modified: branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/pom.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -3,36 +3,30 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <artifactId>messages</artifactId>
-        <groupId>org.jboss.seam.examples</groupId>
+        <groupId>org.jboss.seam.examples-ee6</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>
+        <jndiPattern>java:app/messages-ejb/#{ejbName}</jndiPattern>
     </properties>
 
     <dependencies>
         <dependency>
-            <groupId>org.jboss.seam.examples</groupId>
+            <groupId>org.jboss.seam.examples-ee6</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>
+            <artifactId>jboss-seam-ui-jsf2</artifactId>
             <exclusions>
                 <exclusion>
                     <groupId>org.jboss.seam</groupId>
@@ -82,7 +76,7 @@
             </properties>
             <dependencies>
                 <dependency>
-                    <groupId>org.jboss.seam.examples</groupId>
+                    <groupId>org.jboss.seam.examples-ee6</groupId>
                     <artifactId>messages-ejb</artifactId>
                     <type>ejb</type>
                     <scope>compile</scope>

Modified: 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	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-web/src/main/webapp/WEB-INF/components.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -1,10 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://jboss.com/products/seam/components"
+<components xmlns="http://www.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>
+    
+    <!-- This is required for JBoss AS7 due these EJB components are bound to jboss-seam module  -->
+    <component class="org.jboss.seam.transaction.EjbSynchronizations" jndi-name="java:app/jboss-seam/EjbSynchronizations"/>
+    <component class="org.jboss.seam.async.TimerServiceDispatcher" jndi-name="java:app/jboss-seam/TimerServiceDispatcher"/>
 
 </components>

Modified: branches/community/Seam_2_3/examples-ee6/messages/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/pom.xml	2012-02-09 16:47:46 UTC (rev 14311)
+++ branches/community/Seam_2_3/examples-ee6/messages/pom.xml	2012-02-10 16:01:03 UTC (rev 14312)
@@ -7,7 +7,7 @@
     </parent>
     
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.jboss.seam.examples</groupId>
+    <groupId>org.jboss.seam.examples-ee6</groupId>
     <artifactId>messages</artifactId>
     <packaging>pom</packaging>
     <name>Messages Example (EE6)</name>
@@ -26,19 +26,19 @@
     <dependencyManagement>
         <dependencies>
             <dependency>
-                <groupId>org.jboss.seam.examples</groupId>
+                <groupId>org.jboss.seam.examples-ee6</groupId>
                 <artifactId>messages-ejb</artifactId>
                 <version>${project.version}</version>
                 <type>ejb</type>
             </dependency>
             <dependency>
-                <groupId>org.jboss.seam.examples</groupId>
+                <groupId>org.jboss.seam.examples-ee6</groupId>
                 <artifactId>messages-web</artifactId>
                 <version>${project.version}</version>
                 <type>war</type>
             </dependency>
             <dependency>
-                <groupId>org.jboss.seam.examples</groupId>
+                <groupId>org.jboss.seam.examples-ee6</groupId>
                 <artifactId>messages-ear</artifactId>
                 <version>${project.version}</version>
             </dependency>



More information about the seam-commits mailing list