[weld-commits] Weld SVN: r6864 - in archetypes/javaee6-webapp/trunk: src/main/java/com/mycompany and 1 other directory.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sat Jul 31 13:51:16 EDT 2010


Author: dan.j.allen
Date: 2010-07-31 13:51:15 -0400 (Sat, 31 Jul 2010)
New Revision: 6864

Modified:
   archetypes/javaee6-webapp/trunk/pom.xml
   archetypes/javaee6-webapp/trunk/readme.txt
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRegistration.java
Log:
bump support for JBoss AS to 6.0.0.M4


Modified: archetypes/javaee6-webapp/trunk/pom.xml
===================================================================
--- archetypes/javaee6-webapp/trunk/pom.xml	2010-07-31 01:07:01 UTC (rev 6863)
+++ archetypes/javaee6-webapp/trunk/pom.xml	2010-07-31 17:51:15 UTC (rev 6864)
@@ -218,7 +218,7 @@
                <plugin>
                   <groupId>org.codehaus.mojo</groupId>
                   <artifactId>jboss-maven-plugin</artifactId>
-                  <version>1.4.1-SNAPSHOT</version>
+                  <version>1.4.1</version>
                   <configuration>
                      <jbossHome>${jboss.home}</jbossHome>
                      <serverName>${jboss.domain}</serverName>
@@ -306,7 +306,7 @@
             <dependency>
                <groupId>org.jboss.jbossas</groupId>
                <artifactId>jboss-as-client</artifactId>
-               <version>6.0.0.20100429-M3</version>
+               <version>6.0.0.20100721-M4</version>
                <type>pom</type>
                <scope>test</scope>
             </dependency>

Modified: archetypes/javaee6-webapp/trunk/readme.txt
===================================================================
--- archetypes/javaee6-webapp/trunk/readme.txt	2010-07-31 01:07:01 UTC (rev 6863)
+++ archetypes/javaee6-webapp/trunk/readme.txt	2010-07-31 17:51:15 UTC (rev 6864)
@@ -1,8 +1,8 @@
+                           jboss-javaee6-webapp-src
+                           ************************
 
-                                 jboss-javaee6-webapp-src
+ #Source archetype:# jboss-javaee6-webapp
 
- Source archetype: jboss-javaee6-webapp
-
  What is it?
  ===========
 
@@ -20,7 +20,7 @@
  All you need to run this project is Java 5.0 (Java SDK 1.5) or greator and
  Maven 2.0.10 or greater. However, we strongly recommend Java 6.0 and Maven 3.
  This application is configured to be run on a Java EE 6 application server.
- We've tested it on both GlassFish 3.0.1 and JBoss AS 6.0.0.M3.
+ We've tested it on both GlassFish 3.0.1 and JBoss AS 6.0.0.M4.
 
  NOTE:
  This project retrieves artifacts from the JBoss Community Maven repository
@@ -43,26 +43,26 @@
  Alternatively, you can set the location of JBoss AS using the following
  profile defintion in the .m2/settings.xml file in your home directory:
 
-<?xml version="1.0" encoding="UTF-8"?>
-<settings
-   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/xsd/settings-1.0.0.xsd">
+  <?xml version="1.0" encoding="UTF-8"?>
+  <settings
+     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/xsd/settings-1.0.0.xsd">
+  
+     <profiles>
+        <profile>
+           <id>environment</id>
+           <activation>
+              <activeByDefault>true</activeByDefault>
+           </activation>
+           <properties>
+              <jboss.home>/path/to/jboss-as-6.0.0.M4</jboss.home>
+           </properties>
+        </profile>
+     </profiles>
+     
+  </settings>
 
-   <profiles>
-      <profile>
-         <id>environment</id>
-         <activation>
-            <activeByDefault>true</activeByDefault>
-         </activation>
-         <properties>
-            <jboss.home>/path/to/jboss-as-6.0.0.M3</jboss.home>
-         </properties>
-      </profile>
-   </profiles>
-   
-</settings>
-
  Once you've set either the JBOSS_HOME environment variable or the jboss.home
  Maven property, you can deploy to JBoss AS by executing the following command:
 
@@ -80,10 +80,9 @@
 
  You can also set jboss.home on the commandline:
 
-  mvn package jboss:hard-deploy -Djboss.home=/path/to/jboss-as-6.0.0.M3
+  mvn package jboss:hard-deploy -Djboss.home=/path/to/jboss-as-6.0.0.M4
 
- To summarize, you have three options for specifying the path to your JBoss AS
- installation:
+ In all, you have three options to set the path of your JBoss AS installation:
 
  1. Set the JBOSS_HOME environment variable (e.g., export JBOSS_HOME=/path/to/jboss-as)
  2. Define the jboss.home Maven property in $HOME/.m2/settings.xml
@@ -91,7 +90,7 @@
 
  Now start JBoss AS. The application will be running at the following URL:
 
-  http://localhost:8080/jboss-javaee6-webapp-src/
+ - http://localhost:8080/jboss-javaee6-webapp-src/
 
  To undeploy from JBoss AS, run this command:
 
@@ -151,7 +150,7 @@
  Consult the Arquillian reference documentation to register profiles for any
  supported container.
 
-  http://docs.jboss.org/arquillian/reference/latest/en-US/html/containers.html#d0e678
+ - http://docs.jboss.org/arquillian/reference/latest/en-US/html/containers.html#d0e678
 
  Importing the project into an IDE
  =================================
@@ -165,16 +164,16 @@
  IntelliJ IDEA 9, then all you have to do is open the project as an existing
  project. Both of these IDEs recognize Maven 2 projects natively.
 
- To import into Eclipse, you first need to install the m2eclipse plugin. To get
- started, add the m2eclipse update site (http://m2eclipse.sonatype.org/update/)
- to Eclipse (or use the Help > Eclipse Marketplace...) and install the
+ To import the project into Eclipse, you need the m2eclipse. To install this
+ plugin, add the m2eclipse update site http://m2eclipse.sonatype.org/update/ to
+ Eclipse (or use the Help > Eclipse Marketplace. . .) and then install the
  m2eclipse plugin and required dependencies. Once that's installed, you'll be
  ready to import the project into Eclipse.
 
  NOTE:
  We strongly recommend Eclipse 3.6 (Helios) - http://www.eclipse.org/helios
 
- Select File > Import... and choose the Maven > Existing Maven Projects option.
+ Select File > Import. . . and choose the Maven > Existing Maven Projects option.
  Navigate to the root directory of your project. Eclipse should recognize the
  Maven project and preselect it in the Project box. Click Finish and m2eclipse
  will take it from there.
@@ -186,23 +185,23 @@
 
  Additional configuration is required to get Eclipse to generate the JPA
  metamodel. The archetype includes the necessary Eclipse config files in your
- project.  To enable this feature, right click on the project and select:
+ project. To enable this feature, right click on the project and select:
 
- Properties > Java Compiler > Annotation Processing
+  Properties > Java Compiler > Annotation Processing
 
  Check "Enable annotation processing" then click OK and OK again when your are
  prompted to run a project build.
 
  You can verify your configuration by referring to the Hibernate JPA documentation.
 
-  http://docs.jboss.org/hibernate/stable/jpamodelgen/reference/en-US/html_single/#d0e319
+ - http://docs.jboss.org/hibernate/stable/jpamodelgen/reference/en-US/html_single/#d0e319
 
  Once the project is imported into the IDE, you can execute the Maven commands
  through the IDE controls to deploy the application to a container.
 
  To deploy to GlassFish from Eclipse, you'll need the GlassFish Tools Bundle,
  available at the update site http://download.java.net/glassfish/eclipse/helios
- or from the Help > Eclipse Marketplace...
+ or from the Help > Eclipse Marketplace. . .
 
  Downloading the sources and Javadocs
  ====================================
@@ -218,11 +217,11 @@
  Resources
  =========
 
- Weld archetypes:
- -  Quickstart:        http://seamframework.org/Documentation/WeldQuickstartForMavenUsers
- -  Issue tracker:     https://jira.jboss.org/jira/browse/WELDRAD
- -  Source code:       http://anonsvn.jboss.org/repos/weld/archetypes
- -  Forums:            http://seamframework.org/Community/WeldUsers
- JSR-299 overview:     http://seamframework.org/Weld
- JSF community site:   http://www.javaserverfaces.org
+ - Weld archetypes
+   - Quickstart:         http://seamframework.org/Documentation/WeldQuickstartForMavenUsers
+   - Issue tracker:      https://jira.jboss.org/jira/browse/WELDRAD
+   - Source code:        http://anonsvn.jboss.org/repos/weld/archetypes
+   - Forums:             http://seamframework.org/Community/WeldUsers
+ - JSR-299 overview:     http://seamframework.org/Weld
+ - JSF community site:   http://www.javaserverfaces.org
 

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRegistration.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRegistration.java	2010-07-31 01:07:01 UTC (rev 6863)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRegistration.java	2010-07-31 17:51:15 UTC (rev 6864)
@@ -8,9 +8,10 @@
 import javax.inject.Named;
 import javax.persistence.EntityManager;
 import javax.transaction.UserTransaction;
+import javax.ejb.Stateful;
 import org.slf4j.Logger;
 
-//@Stateful // enable when JBoss AS M4 is out
+// @Stateful // Adding this annotation eliminates need for manual transaction demarcation
 @Model
 public class MemberRegistration
 {
@@ -21,8 +22,11 @@
    @MemberRepository
    private EntityManager em;
 
+   //@Inject
+   //private UserTransaction utx;
+
    @Inject
-   private UserTransaction utx;
+   private Event<Member> memberEventSrc;
    
    private Member newMember;
 
@@ -32,12 +36,11 @@
    {
       return newMember;
    }
-   @Inject
-   private Event<Member> memberEventSrc;
 
    public void register() throws Exception
    {
       log.info("Registering " + newMember.getName());
+      // UserTransaction only needed when bean is not an EJB
       utx.begin();
       em.joinTransaction();
       em.persist(newMember);



More information about the weld-commits mailing list