cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r988378 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/
Date Tue, 24 Aug 2010 03:10:59 GMT
Author: dkulp
Date: Tue Aug 24 03:10:59 2010
New Revision: 988378

URL: http://svn.apache.org/viewvc?rev=988378&view=rev
Log:
[CXF-2922] Fix warning with spring 3 by renaming a method.
Fix JAXRSLoggingAtomPushSpringTest by making sure the beans create the
loggers before the AtomPush things add handlers to them.

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServerResourceCreatedOutside.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerUserResourceTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLoggingAtomPushSpringTest.java
    cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java?rev=988378&r1=988377&r2=988378&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
Tue Aug 24 03:10:59 2010
@@ -177,9 +177,12 @@ public class JAXRSServerFactoryBean exte
      * 
      * @return
      */
-    public void setServiceBeans(Object... beans) {
+    public void setServiceBeanObjects(Object... beans) {
         setServiceBeans(Arrays.asList(beans));
     }
+    public void setServiceBean(Object bean) {
+        setServiceBeans(Arrays.asList(bean));
+    }
     
     public void setServiceBeans(List<Object> beans) {
         serviceFactory.setResourceClassesFromBeans(beans);

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServerResourceCreatedOutside.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServerResourceCreatedOutside.java?rev=988378&r1=988377&r2=988378&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServerResourceCreatedOutside.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServerResourceCreatedOutside.java
Tue Aug 24 03:10:59 2010
@@ -28,7 +28,7 @@ public class BookServerResourceCreatedOu
     protected void run() {
         JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
         BookStore bs = new BookStore();
-        sf.setServiceBeans(bs);
+        sf.setServiceBean(bs);
         sf.setAddress("http://localhost:" + PORT + "/");
         sf.create();
         

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerUserResourceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerUserResourceTest.java?rev=988378&r1=988377&r2=988378&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerUserResourceTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerUserResourceTest.java
Tue Aug 24 03:10:59 2010
@@ -83,7 +83,7 @@ public class JAXRSClientServerUserResour
             
             String modelRef = "classpath:/org/apache/cxf/systest/jaxrs/resources/resources2.xml";
             sf.setModelRefWithServiceClass(modelRef, BookStoreNoAnnotationsInterface.class);
-            sf.setServiceBeans(new BookStoreNoAnnotationsImpl());
+            sf.setServiceBean(new BookStoreNoAnnotationsImpl());
             sf.create();
 
         }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLoggingAtomPushSpringTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLoggingAtomPushSpringTest.java?rev=988378&r1=988377&r2=988378&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLoggingAtomPushSpringTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLoggingAtomPushSpringTest.java
Tue Aug 24 03:10:59 2010
@@ -82,7 +82,11 @@ public class JAXRSLoggingAtomPushSpringT
     @Test
     public void testFeedsWithLogRecordsOneEntry() throws Exception {
         WebClient wc = WebClient.create("http://localhost:" + PORT + "/root");
-        wc.path("/log").get();
+        try  {
+            wc.path("/log").get();
+        } catch (Exception ex) {
+            //ignore
+        }
         Thread.sleep(3000);
         List<Feed> elements = Resource.getElements();
         assertEquals(8, elements.size());
@@ -191,8 +195,14 @@ public class JAXRSLoggingAtomPushSpringT
     @Ignore
     @Path("/root")
     public static class Resource {
-        private static final Logger LOG1 = LogUtils.getL7dLogger(Resource.class);
-        private static final Logger LOG2 = LogUtils.getL7dLogger(Resource.class, null, "namedLogger");
+        private static final Logger LOG1;
+        private static final Logger LOG2;
+        
+        static {
+            System.gc();
+            LOG1 = LogUtils.getL7dLogger(Resource.class);
+            LOG2 = LogUtils.getL7dLogger(Resource.class, null, "namedLogger");
+        }
         
         private static List<Feed> feeds = new ArrayList<Feed>();
         

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml?rev=988378&r1=988377&r2=988378&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml Tue
Aug 24 03:10:59 2010
@@ -40,7 +40,20 @@ http://www.springframework.org/schema/ut
 
 	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
-
+	<jaxrs:server id="atomserver" address="/">
+		<jaxrs:serviceBeans>
+			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource"/>
+			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource2"/>
+			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource3"/>
+			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource4"/>
+			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource5"/>
+		</jaxrs:serviceBeans>
+		<jaxrs:providers>
+			<ref bean="feed" />
+			<ref bean="entry" />
+		</jaxrs:providers>
+	</jaxrs:server>
+	
 	<bean class="org.apache.cxf.management.web.logging.atom.AtomPushBean"
 		init-method="init">
 		<property name="multiplicity" value="one"/>
@@ -133,19 +146,7 @@ factory-method="create">
 	    <property name="formattedOutput" value="true"/>
 	</bean>
 
-	<jaxrs:server id="atomserver" address="/">
-		<jaxrs:serviceBeans>
-			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource"/>
-			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource2"/>
-			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource3"/>
-			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource4"/>
-			<bean class="org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource5"/>
-		</jaxrs:serviceBeans>
-		<jaxrs:providers>
-			<ref bean="feed" />
-			<ref bean="entry" />
-		</jaxrs:providers>
-	</jaxrs:server>
+
 
 	<!--  
 	Other config samples:



Mime
View raw message