[seam-commits] Seam SVN: r14139 - in branches/community/Seam_2_3/examples/booking: booking-ear/src/main and 6 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Jul 29 07:30:46 EDT 2011


Author: manaRH
Date: 2011-07-29 07:30:46 -0400 (Fri, 29 Jul 2011)
New Revision: 14139

Added:
   branches/community/Seam_2_3/examples/booking/booking-ear/src/main/application/
   branches/community/Seam_2_3/examples/booking/booking-ear/src/main/application/META-INF/
   branches/community/Seam_2_3/examples/booking/booking-ear/src/main/application/META-INF/jboss-deployment-structure.xml
   branches/community/Seam_2_3/examples/booking/booking-web/src/main/resources-as7/
   branches/community/Seam_2_3/examples/booking/booking-web/src/main/resources-as7/components.xml
Modified:
   branches/community/Seam_2_3/examples/booking/booking-ear/pom.xml
   branches/community/Seam_2_3/examples/booking/booking-ejb/src/main/resources/META-INF/persistence.xml
   branches/community/Seam_2_3/examples/booking/booking-web/pom.xml
Log:
added profile jbossas7 for Booking example

Modified: branches/community/Seam_2_3/examples/booking/booking-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/booking/booking-ear/pom.xml	2011-07-29 11:29:54 UTC (rev 14138)
+++ branches/community/Seam_2_3/examples/booking/booking-ear/pom.xml	2011-07-29 11:30:46 UTC (rev 14139)
@@ -54,18 +54,13 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-ear-plugin</artifactId>
                 <version>2.3.2</version>
-                <configuration>
-                    <version>5</version>
+                <configuration>                    
                     <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-booking</loader-repository>
-                    </jboss>
                     <modules>
                         <webModule>
                             <groupId>org.jboss.seam.examples</groupId>
@@ -215,5 +210,126 @@
                 </dependency>
             </dependencies>
         </profile>
+        
+        <profile>
+            <id>jbossas7</id>
+            
+            <build>
+            	<plugins>
+	            	<plugin>
+		                <groupId>org.apache.maven.plugins</groupId>
+		                <artifactId>maven-ear-plugin</artifactId>
+		                <version>2.3.2</version>
+		                <configuration>	                    
+		                    <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>
+		                    <modules>
+		                        <webModule>
+		                            <groupId>org.jboss.seam.examples</groupId>
+		                            <artifactId>booking-web</artifactId>
+		                            <contextRoot>/seam-booking</contextRoot>
+		                            <bundleFileName>booking-web.war</bundleFileName>
+		                        </webModule>
+		                        <ejbModule>
+		                            <groupId>org.jboss.seam.examples</groupId>
+		                            <artifactId>booking-ejb</artifactId>
+		                            <bundleFileName>booking-ejb.jar</bundleFileName>
+		                        </ejbModule>
+                                <ejbModule>
+                                    <groupId>org.jboss.seam</groupId>
+                                    <artifactId>jboss-seam</artifactId>
+                                    <bundleFileName>jboss-seam.jar</bundleFileName>
+                                </ejbModule>
+		                    </modules>
+		                    <!-- This is not needed if you provide jboss-deployment-structure.xml with dependencies -->
+							<archive>
+								<manifestEntries>
+									<Dependencies>org.apache.commons.logging, org.dom4j, org.apache.commons.collections</Dependencies>
+								</manifestEntries>
+							</archive>
+		                </configuration>
+	            	</plugin>
+            	</plugins>
+            </build>
+            
+            <dependencies>               
+                <dependency>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-validator</artifactId>
+                    <scope>compile</scope>
+                    <exclusions>
+                        <exclusion>
+                        	<groupId>antlr</groupId>
+                        	<artifactId>antlr</artifactId>
+                        </exclusion>
+                    	<exclusion>
+                            <groupId>dom4j</groupId>
+                            <artifactId>dom4j</artifactId>
+                    	</exclusion>
+                    	<exclusion>
+                            <groupId>javax.transaction</groupId>
+                            <artifactId>jta</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>javassist</groupId>
+                            <artifactId>javassist</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-annotations</artifactId>
+                    <scope>compile</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>org.hibernate</groupId>
+                            <artifactId>ejb3-persistence</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>dom4j</groupId>
+                            <artifactId>dom4j</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-entitymanager</artifactId>
+                    <scope>compile</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>org.hibernate</groupId>
+                            <artifactId>ejb3-persistence</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>dom4j</groupId>
+                            <artifactId>dom4j</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>javax.transaction</groupId>
+                            <artifactId>jta</artifactId>
+                        </exclusion>
+                        <exclusion>
+                            <groupId>javassist</groupId>
+                            <artifactId>javassist</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+        
     </profiles>
 </project>

Added: branches/community/Seam_2_3/examples/booking/booking-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples/booking/booking-ear/src/main/application/META-INF/jboss-deployment-structure.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples/booking/booking-ear/src/main/application/META-INF/jboss-deployment-structure.xml	2011-07-29 11:30:46 UTC (rev 14139)
@@ -0,0 +1,25 @@
+<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" slot="1.2" export="true"/>
+          <module name="com.sun.jsf-impl" slot="1.2" export="true"/>
+	    </dependencies>
+  </deployment>
+  
+  
+  <sub-deployment name="booking-web.war"> 
+  	<exclusions>
+	      <module name="javax.faces.api" slot="main"/>
+	      <module name="com.sun.jsf-impl" slot="main"/>
+	    </exclusions>
+	    <dependencies>
+	      <module name="javax.faces.api" slot="1.2"/>
+          <module name="com.sun.jsf-impl" slot="1.2"/>
+	    </dependencies>
+  </sub-deployment> 
+
+</jboss-deployment-structure> 

Modified: branches/community/Seam_2_3/examples/booking/booking-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples/booking/booking-ejb/src/main/resources/META-INF/persistence.xml	2011-07-29 11:29:54 UTC (rev 14138)
+++ branches/community/Seam_2_3/examples/booking/booking-ejb/src/main/resources/META-INF/persistence.xml	2011-07-29 11:30:46 UTC (rev 14139)
@@ -10,7 +10,7 @@
          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
          <property name="hibernate.show_sql" value="true"/>
          <!-- These are the default for JBoss EJB3, but not for HEM: -->
-         <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+<!--          <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> -->
          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
       </properties>
    </persistence-unit>

Modified: branches/community/Seam_2_3/examples/booking/booking-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples/booking/booking-web/pom.xml	2011-07-29 11:29:54 UTC (rev 14138)
+++ branches/community/Seam_2_3/examples/booking/booking-web/pom.xml	2011-07-29 11:30:46 UTC (rev 14139)
@@ -94,6 +94,45 @@
     </build>
   
     <profiles>
+    	<profile>
+            <id>jbossas7</id>
+<!--             <properties> -->
+<!--                 <jndiPattern>java:app/jboss-seam/#{ejbName}</jndiPattern> -->
+<!--                 <jndiPattern>java:app/booking-ejb/#{ejbName}</jndiPattern> -->
+<!--             </properties> -->
+            <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>
+                                    <excludes>
+                                        <exclude>**/web.xml</exclude>
+                                        <exclude>**/components.xml</exclude>
+                                    </excludes>
+                                </resource>
+                                <resource>
+                                    <directory>src/main/resources-as7</directory>
+                                    <filtering>true</filtering>
+                                    <includes>
+                                        <include>components.xml</include>
+                                    </includes>
+                                    <targetPath>WEB-INF</targetPath>
+                                </resource>
+                            </webResources>
+                        </configuration>
+                    </plugin>
+                </plugins>                
+            </build>
+            <dependencies>
+            	
+            </dependencies>
+        </profile>
+        
         <profile>
             <id>cluster</id>
             <properties>

Added: branches/community/Seam_2_3/examples/booking/booking-web/src/main/resources-as7/components.xml
===================================================================
--- branches/community/Seam_2_3/examples/booking/booking-web/src/main/resources-as7/components.xml	                        (rev 0)
+++ branches/community/Seam_2_3/examples/booking/booking-web/src/main/resources-as7/components.xml	2011-07-29 11:30:46 UTC (rev 14139)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:core="http://jboss.com/products/seam/core"
+            xmlns:security="http://jboss.com/products/seam/security"
+            xmlns:transaction="http://jboss.com/products/seam/transaction"
+            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/transaction http://jboss.com/products/seam/transaction-2.3.xsd
+                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.3.xsd
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+
+    <!-- jboss as 7 profile is not using jndi pattern and rather defines for every EJB jndi name below -->
+    <core:init debug="true" distributable="@distributable@"/>   
+        
+    <core:manager conversation-timeout="120000"
+                  concurrent-request-timeout="500"
+                  conversation-id-parameter="cid"/>
+
+    <transaction:ejb-transaction/>
+
+    <security:identity authenticate-method="#{authenticator.authenticate}"/>    
+    
+    <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"/>
+    <component class="org.jboss.seam.example.booking.AuthenticatorAction" jndi-name="java:app/booking-ejb/AuthenticatorAction" />
+    <component class="org.jboss.seam.example.booking.BookingListAction"  jndi-name="java:app/booking-ejb/BookingListAction" />
+    <component class="org.jboss.seam.example.booking.RegisterAction" jndi-name="java:app/booking-ejb/RegisterAction" />
+    <component class="org.jboss.seam.example.booking.HotelSearchingAction" jndi-name="java:app/booking-ejb/HotelSearchingAction" />
+    <component class="org.jboss.seam.example.booking.HotelBookingAction" jndi-name="java:app/booking-ejb/HotelBookingAction" />
+    <component class="org.jboss.seam.example.booking.ChangePasswordAction" jndi-name="java:app/booking-ejb/ChangePasswordAction" />
+
+</components>



More information about the seam-commits mailing list