You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Glen Mazza <gl...@verizon.net> on 2008/01/21 20:55:22 UTC

Re: svn commit: r613943 - in /incubator/cxf/branches/2.0.x-fixes: ./ distribution/bundle/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ systests/src/test/java/org/apache/cxf/systest/jms/

Am Montag, den 21.01.2008, 17:25 +0000 schrieb dkulp@apache.org:
> Author: dkulp
> Date: Mon Jan 21 09:25:54 2008
> New Revision: 613943
> 
> Modified:
> incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=613943&r1=613942&r2=613943&view=diff
> ==============================================================================
> --- incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java (original)
> +++ incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java Mon Jan 21 09:25:54 2008
> @@ -26,6 +26,8 @@
>  import java.io.OutputStream;
>  import java.util.Calendar;
>  import java.util.GregorianCalendar;
> +import java.util.List;
> +import java.util.Map;
>  import java.util.SimpleTimeZone;
>  import java.util.TimeZone;
>  import java.util.concurrent.Executor;
> @@ -45,6 +47,7 @@
>  import org.apache.cxf.common.logging.LogUtils;
>  import org.apache.cxf.configuration.Configurable;
>  import org.apache.cxf.configuration.Configurer;
> +import org.apache.cxf.helpers.CastUtils;
>  import org.apache.cxf.io.CachedOutputStream;
>  import org.apache.cxf.message.Message;
>  import org.apache.cxf.message.MessageImpl;
> @@ -372,7 +375,7 @@
>              message.put(JMSConstants.JMS_REQUEST_MESSAGE, 
>                          inMessage.get(JMSConstants.JMS_REQUEST_MESSAGE));
>              message.setContent(OutputStream.class,
> -                               new JMSOutputStream(inMessage));
> +                               new JMSOutputStream(inMessage, message));
>          }
>          
>          protected Logger getLogger() {
> @@ -383,14 +386,16 @@
>      private class JMSOutputStream extends CachedOutputStream {
>                  
>          private Message inMessage;
> +        private Message outMessage;
>          private javax.jms.Message reply;
>          private Queue replyTo;
>          private QueueSender sender;
>          
>          // setup the ByteArrayStream
> -        public JMSOutputStream(Message m) {
> +        public JMSOutputStream(Message m, Message o) {

I think it would be nice for our JavaDoc if you spelled out "m" and "o"
here.



> Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=613943&r1=613942&r2=613943&view=diff
> ==============================================================================
> --- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java (original)
> +++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Mon Jan 21 09:25:54 2008
> @@ -348,8 +348,15 @@
>                             "JMS_SAMPLE_CORRELATION_ID".equals(responseHdr.getJMSCorrelationID()));
>                  assertTrue("response Headers must conain the app property set in request context.", 
>                             responseHdr.getProperty() != null);
> -                assertEquals("response Headers must match the app property set in request context.",
> -                             testReturnPropertyName, responseHdr.getProperty().iterator().next().getName());
> +                
> +                boolean found = false;
> +                for (JMSPropertyType p : responseHdr.getProperty()) {
> +                    if (testReturnPropertyName.equals(p.getName())) {
> +                        found = true;

shouldn't "break;" be added here ?

Regards,
Glen

> +                    }
> +                }
> +                assertTrue("response Headers must match the app property set in request context.",
> +                             found);
>              }
>          } catch (UndeclaredThrowableException ex) {
>              throw (Exception)ex.getCause();
> 
>