cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r983675 - in /cxf/trunk: parent/ rt/transports/jms/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/ systests/transports/src/test/java/org/apache/cxf/systest/jms/ sy...
Date Mon, 09 Aug 2010 15:06:43 GMT
Author: dkulp
Date: Mon Aug  9 15:06:42 2010
New Revision: 983675

URL: http://svn.apache.org/viewvc?rev=983675&view=rev
Log:
Get rid of warnings, but don't break spring2 support

Modified:
    cxf/trunk/parent/pom.xml
    cxf/trunk/rt/transports/jms/pom.xml
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/trunk/systests/uncategorized/pom.xml

Modified: cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Mon Aug  9 15:06:42 2010
@@ -661,6 +661,16 @@
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
+                <artifactId>spring-jms</artifactId>
+                <version>${spring.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-tx</artifactId>
+                <version>${spring.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
                 <artifactId>spring-core</artifactId>
                 <version>${spring.version}</version>
                 <exclusions>

Modified: cxf/trunk/rt/transports/jms/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/pom.xml?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/pom.xml (original)
+++ cxf/trunk/rt/transports/jms/pom.xml Mon Aug  9 15:06:42 2010
@@ -95,12 +95,10 @@
         <dependency>
         	<groupId>org.springframework</groupId>
         	<artifactId>spring-jms</artifactId>
-        	<version>${spring.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-tx</artifactId>
-            <version>${spring.version}</version>
         </dependency>
 
         <dependency>

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Mon Aug  9 15:06:42 2010
@@ -28,7 +28,6 @@ import org.springframework.beans.factory
 import org.springframework.beans.factory.annotation.Required;
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.jms.connection.SingleConnectionFactory;
-import org.springframework.jms.connection.SingleConnectionFactory102;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.support.destination.DestinationResolver;
@@ -442,7 +441,11 @@ public class JMSConfiguration implements
                         scf = new SingleConnectionFactory(connectionFactory);
                     }
                 } else {
-                    scf = new SingleConnectionFactory102(connectionFactory, pubSubDomain);
+                    @SuppressWarnings("deprecation")
+                    SingleConnectionFactory scf2 
+                        = new org.springframework.jms.connection.SingleConnectionFactory102(connectionFactory,
+                                                                                        
   pubSubDomain);
+                    scf = scf2;
                 }
                 if (getDurableSubscriptionClientId() != null) {
                     scf.setClientId(getDurableSubscriptionClientId());

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Mon Aug  9 15:06:42 2010
@@ -130,6 +130,7 @@ public class JMSDestination extends Abst
         this.deactivate();
     }
 
+    @SuppressWarnings("unchecked")
     private Destination resolveDestinationName(final JmsTemplate jmsTemplate, final String
name) {
         SessionCallback sc = new SessionCallback() {
             public Object doInJms(Session session) throws JMSException {

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Mon Aug  9 15:06:42 2010
@@ -37,11 +37,9 @@ import org.springframework.core.task.Tas
 import org.springframework.jms.connection.SingleConnectionFactory;
 import org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter;
 import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.JmsTemplate102;
 import org.springframework.jms.core.SessionCallback;
 import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
-import org.springframework.jms.listener.DefaultMessageListenerContainer102;
 import org.springframework.jms.support.destination.DestinationResolver;
 
 /**
@@ -103,7 +101,10 @@ public final class JMSFactory {
         if (jmsConfig.getJmsTemplate() != null) {
             return jmsConfig.getJmsTemplate();
         }
-        JmsTemplate jmsTemplate = jmsConfig.isUseJms11() ? new JmsTemplate() : new JmsTemplate102();
+        @SuppressWarnings("deprecation")
+        JmsTemplate jmsTemplate = jmsConfig.isUseJms11() 
+            ? new JmsTemplate() 
+            : new org.springframework.jms.core.JmsTemplate102();
         jmsTemplate.setConnectionFactory(jmsConfig.getOrCreateWrappedConnectionFactory());
         jmsTemplate.setPubSubDomain(jmsConfig.isPubSubDomain());
         if (jmsConfig.getReceiveTimeout() != null) {
@@ -135,6 +136,7 @@ public final class JMSFactory {
      * @param destinationName null for temp dest or a destination name
      * @return
      */
+    @SuppressWarnings("deprecation")
     public static AbstractMessageListenerContainer createJmsListener(EndpointInfo ei,
                                                                     JMSConfiguration jmsConfig,
                                                                     MessageListener listenerHandler,
@@ -167,7 +169,7 @@ public final class JMSFactory {
                 jmsListener = new DefaultMessageListenerContainer();
             }
         } else {
-            jmsListener = new DefaultMessageListenerContainer102();
+            jmsListener = new org.springframework.jms.listener.DefaultMessageListenerContainer102();
         }
         
         return createJmsListener(jmsListener,
@@ -191,8 +193,10 @@ public final class JMSFactory {
                                                                     Destination destination,

                                                                     String messageSelectorPrefix,
                                                                     boolean userCID) {
+        @SuppressWarnings("deprecation")
         DefaultMessageListenerContainer jmsListener = jmsConfig.isUseJms11()
-            ? new DefaultMessageListenerContainer() : new DefaultMessageListenerContainer102();
+            ? new DefaultMessageListenerContainer() 
+            : new org.springframework.jms.listener.DefaultMessageListenerContainer102();
         
         return createJmsListener(jmsListener,
                                  jmsConfig,
@@ -207,8 +211,10 @@ public final class JMSFactory {
                                                                     String destination, 
                                                                     String messageSelectorPrefix,
                                                                     boolean userCID) {
+        @SuppressWarnings("deprecation")
         DefaultMessageListenerContainer jmsListener = jmsConfig.isUseJms11()
-            ? new DefaultMessageListenerContainer() : new DefaultMessageListenerContainer102();
+            ? new DefaultMessageListenerContainer() 
+            : new org.springframework.jms.listener.DefaultMessageListenerContainer102();
         
         return createJmsListener(jmsListener,
                                  jmsConfig,
@@ -324,6 +330,7 @@ public final class JMSFactory {
      * @param pubSubDomain true=pubSub, false=Queues
      * @return resolved destination
      */
+    @SuppressWarnings("unchecked")
     public static Destination resolveOrCreateDestination(final JmsTemplate jmsTemplate,
                                                           final String replyToDestinationName,
                                                           final boolean pubSubDomain) {

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java (original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java Mon
Aug  9 15:06:42 2010
@@ -53,7 +53,6 @@ import org.apache.cxf.transport.jms.uri.
 import org.apache.cxf.transport.jms.uri.JMSEndpointParser;
 import org.springframework.jms.support.JmsUtils;
 import org.springframework.jms.support.converter.MessageConversionException;
-import org.springframework.jms.support.converter.SimpleMessageConverter102;
 
 public final class JMSUtils {
 
@@ -118,6 +117,7 @@ public final class JMSUtils {
      * @return the message payload as byte[]
      * @throws UnsupportedEncodingException
      */
+    @SuppressWarnings("deprecation")
     public static void retrieveAndSetPayload(org.apache.cxf.message.Message inMessage,
                                              Message message, String encoding)
         throws UnsupportedEncodingException {
@@ -125,7 +125,8 @@ public final class JMSUtils {
         Object converted;
         byte[] result;
         try {
-            converted = new SimpleMessageConverter102().fromMessage(message);
+            converted = new org.springframework.jms.support.converter.SimpleMessageConverter102()
+                .fromMessage(message);
         } catch (MessageConversionException e) {
             throw new RuntimeException("Conversion failed", e);
         } catch (JMSException e) {

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Mon Aug  9 15:06:42 2010
@@ -168,6 +168,7 @@ public class JMSConduitTest extends Abst
                 return JMSUtils.createAndSetPayload(testBytes, session, JMSConstants.BYTE_MESSAGE_TYPE);
             }
         };
+        @SuppressWarnings("unchecked")
         javax.jms.Message message = (javax.jms.Message)jmsTemplate.execute(sc);
         
         // The ibm jdk finalizes conduit (during most runs of this test) and

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
(original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
Mon Aug  9 15:06:42 2010
@@ -1249,6 +1249,7 @@ public class JMSClientServerTest extends
 
         Thread t = new Thread() {
             public void run() {
+                @SuppressWarnings("unchecked")
                 Destination destination = (Destination)jmsTemplate.execute(new SessionCallback()
{
                     public Object doInJms(Session session) throws JMSException {
                         DestinationResolver resolv = jmsTemplate.getDestinationResolver();
@@ -1264,7 +1265,8 @@ public class JMSClientServerTest extends
                     }
                 };
                     
-                destination = (Destination)jmsTemplate.execute(new SessionCallback() {
+                @SuppressWarnings("unchecked")
+                Destination destination2 = (Destination)jmsTemplate.execute(new SessionCallback()
{
                     public Object doInJms(Session session) throws JMSException {
                         DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                         return resolv.resolveDestinationName(session,
@@ -1272,7 +1274,7 @@ public class JMSClientServerTest extends
                                                              false);
                     }
                 });
-                jmsTemplate.send(destination, messageCreator);
+                jmsTemplate.send(destination2, messageCreator);
             }
         };
 

Modified: cxf/trunk/systests/uncategorized/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/pom.xml?rev=983675&r1=983674&r2=983675&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/pom.xml (original)
+++ cxf/trunk/systests/uncategorized/pom.xml Mon Aug  9 15:06:42 2010
@@ -312,6 +312,18 @@
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jms</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
             <artifactId>${spring.mock}</artifactId>
             <version>${spring.version}</version>
         </dependency>



Mime
View raw message