[weld-commits] Weld SVN: r6705 - archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sat Jul 17 15:24:44 EDT 2010


Author: dan.j.allen
Date: 2010-07-17 15:24:44 -0400 (Sat, 17 Jul 2010)
New Revision: 6705

Modified:
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepository.java
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepositoryProducer.java
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberResourceRESTService.java
Log:
whitespace and formatting; minor comments


Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java	2010-07-17 19:20:39 UTC (rev 6704)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/JaxRsActivator.java	2010-07-17 19:24:44 UTC (rev 6705)
@@ -11,4 +11,7 @@
  * NOTE As of JBoss AS 6.0.0.M3, JAX-RS does not activate properly.
  */
 @ApplicationPath("/rest")
-public class JaxRsActivator extends Application{/* left blank intentionally */}
+public class JaxRsActivator extends Application
+{
+   /* class body intentionally left blank */
+}

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepository.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepository.java	2010-07-17 19:20:39 UTC (rev 6704)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepository.java	2010-07-17 19:24:44 UTC (rev 6705)
@@ -15,4 +15,7 @@
 @Qualifier
 @Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)
-public @interface MemberRepository{/*left blank intentionally*/}
+public @interface MemberRepository
+{
+   /* class body intentionally left blank */
+}

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepositoryProducer.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepositoryProducer.java	2010-07-17 19:20:39 UTC (rev 6704)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberRepositoryProducer.java	2010-07-17 19:24:44 UTC (rev 6705)
@@ -4,11 +4,13 @@
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
 /**
- * This class uses CDI to produce @MemberRepository EntityManagers.
+ * This class uses CDI to produce EntityManager instances qualified that are
+ * qualified as @MemberRepository. Therefore, to inject an instance, @Inject
+ * must be followed by @MemberRepository.
  */
 public class MemberRepositoryProducer
 {
-   @SuppressWarnings("unused")   //tell IDE to ignore warnings about em not being used.  
+   @SuppressWarnings("unused") // tell IDE to ignore warnings about em not being used
    @Produces
    @MemberRepository
    @PersistenceContext

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberResourceRESTService.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberResourceRESTService.java	2010-07-17 19:20:39 UTC (rev 6704)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/MemberResourceRESTService.java	2010-07-17 19:24:44 UTC (rev 6705)
@@ -10,7 +10,7 @@
 /**
  * JAX-RS Example
  * 
- *  This class produces a RESTful service to read the contents of the members table.   
+ * This class produces a RESTful service to read the contents of the members table.   
  */
 @Path("/members")
 @RequestScoped
@@ -24,7 +24,7 @@
    @GET
    public List<Member> listAllMembers()
    {
-      @SuppressWarnings("unchecked")   //Force IDE to ignore warnings about "genericizing" the results of this query
+      @SuppressWarnings("unchecked") // Force IDE to ignore warnings about "genericizing" the results of this query
       final List<Member> results = em.createQuery(ALL_MEMBERS).getResultList();
       return results;
    }



More information about the weld-commits mailing list