Author: dkulp Date: Thu Aug 9 20:35:43 2012 New Revision: 1371463 URL: http://svn.apache.org/viewvc?rev=1371463&view=rev Log: Merged revisions 1366458 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1366458 | sergeyb | 2012-07-27 13:06:47 -0400 (Fri, 27 Jul 2012) | 16 lines Merged revisions 1366456 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes ................ r1366456 | sergeyb | 2012-07-27 18:03:03 +0100 (Fri, 27 Jul 2012) | 9 lines Merged revisions 1366455 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1366455 | sergeyb | 2012-07-27 18:01:15 +0100 (Fri, 27 Jul 2012) | 1 line [CXF-4444] Updating system jaxrs tests ........ ................ ........ Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java?rev=1371463&r1=1371462&r2=1371463&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java (original) +++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java Thu Aug 9 20:35:43 2012 @@ -18,12 +18,18 @@ */ package org.apache.cxf.systest.jaxrs; +import javax.annotation.PostConstruct; +import javax.annotation.Resource; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; @Path("/simplebooks/{id}") public class BookStoreSimple { + @Resource + private Book injectedBook; + + @GET public Book getBook(@PathParam("id") long id) { return new Book("Simple", id); @@ -34,4 +40,10 @@ public class BookStoreSimple { public Book getBook2(@PathParam("id") long id) { return getBook(id); } + @PostConstruct + public void postConstruct() { + if (injectedBook == null) { + throw new IllegalStateException("Book resource has not been injected"); + } + } } Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java?rev=1371463&r1=1371462&r2=1371463&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java (original) +++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java Thu Aug 9 20:35:43 2012 @@ -26,7 +26,6 @@ import java.util.Map; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; -import javax.annotation.Resource; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.MatrixParam; @@ -58,8 +57,6 @@ public class BookStoreSpring { @Context private UriInfo ui; private boolean postConstructCalled; - @Resource - private Book injectedBook; public BookStoreSpring() { init(); @@ -69,9 +66,6 @@ public class BookStoreSpring { @PostConstruct public void postConstruct() { - if (injectedBook == null) { - throw new IllegalStateException("Book resource has not been injected"); - } postConstructCalled = true; } Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml?rev=1371463&r1=1371462&r2=1371463&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml (original) +++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml Thu Aug 9 20:35:43 2012 @@ -43,7 +43,6 @@ http://cxf.apache.org/schemas/core.xsd"> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <bean class="org.apache.cxf.systest.jaxrs.BookStoreSpring" id="serviceBean"/> - <bean class="org.apache.cxf.systest.jaxrs.Book"/> <jaxrs:server id="bookservice" address="/bookstore"> Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml?rev=1371463&r1=1371462&r2=1371463&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml (original) +++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml Thu Aug 9 20:35:43 2012 @@ -29,6 +29,8 @@ http://cxf.apache.org/schemas/jaxrs.xsd" <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> + <bean class="org.apache.cxf.systest.jaxrs.Book"/> + <jaxrs:server id="bookservice" address="/rest"> <jaxrs:serviceBeans>
