[seam-commits] Seam SVN: r12371 - in branches/community/Seam_2_2: examples/restbay/src/org/jboss/seam/example/restbay/test and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Apr 2 04:49:52 EDT 2010


Author: jharting
Date: 2010-04-02 04:49:51 -0400 (Fri, 02 Apr 2010)
New Revision: 12371

Modified:
   branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml
   branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/testng.xml
Log:
JBSEAM-4039 Seam components can now be JAX-RS subresources

Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml	2010-04-02 08:31:08 UTC (rev 12370)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml	2010-04-02 08:49:51 UTC (rev 12371)
@@ -493,17 +493,25 @@
             EJB Seam components are supported as REST resources. Always annotate the local business interface, not
             the EJB implementation class, with JAX-RS annotations. The EJB has to be <literal>STATELESS</literal>.
          </para>
+         
+         <para>
+            Sub-resources as defined in the JAX RS specification, section 3.4.1, can also be Seam component instances:
+         </para>
+         
+<programlisting role="JAVA"><![CDATA[@Path("/garage")
+ at Name("garage")
+public class GarageService
+{
+   ...
+   
+   @Path("/vehicles")
+   public VehicleService getVehicles() {
+      return (VehicleService) Component.getInstance(VehicleService.class);
+   }
+}]]></programlisting>
 
          <note>
             <para>
-               Sub-resources as defined in the JAX RS specification, section 3.4.1, can not be Seam component instances
-               at this time. Only root resource classes can be registered as Seam components. In other words, do not
-               return a Seam component instance from a root resource method.
-            </para>
-         </note>
-
-         <note>
-            <para>
                 Provider classes can currently not be Seam components. Although you can configure an
                 <literal>@Provider</literal> annotated class as a Seam component, it will at runtime be managed
                 by RESTEasy as a singleton with no Seam interception, bijection, etc. The instance will not be

Modified: branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/testng.xml
===================================================================
--- branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/testng.xml	2010-04-02 08:31:08 UTC (rev 12370)
+++ branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/testng.xml	2010-04-02 08:49:51 UTC (rev 12371)
@@ -36,13 +36,11 @@
       </classes>
     </test>
     
-    <!-- JBSEAM-4039
     <test name="RestBay Subresources">
       <classes>
         <class name="org.jboss.seam.example.restbay.test.SubresourceTest"/>
       </classes>
     </test>
-    -->
 
     <test name="RestBay DBUnit Integration">
 



More information about the seam-commits mailing list