camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1476540 - in /camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor: AnnotatedBookServiceImpl.java BookService.java MixedPropagationTransactedTest.java
Date Sat, 27 Apr 2013 09:17:51 GMT
Author: bvahdat
Date: Sat Apr 27 09:17:50 2013
New Revision: 1476540

URL: http://svn.apache.org/r1476540
Log:
Since Spring 3.1 SimpleJdbcTemplate has been deprecated.

Modified:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/AnnotatedBookServiceImpl.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/BookService.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/AnnotatedBookServiceImpl.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/AnnotatedBookServiceImpl.java?rev=1476540&r1=1476539&r2=1476540&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/AnnotatedBookServiceImpl.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/AnnotatedBookServiceImpl.java
Sat Apr 27 09:17:50 2013
@@ -21,7 +21,7 @@ import javax.sql.DataSource;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -52,7 +52,7 @@ public class AnnotatedBookServiceImpl im
         }
 
         // create new local datasource to store in DB
-        new SimpleJdbcTemplate(dataSource).update("insert into books (title) values (?)",
title);
+        new JdbcTemplate(dataSource).update("insert into books (title) values (?)", title);
 
         template.sendBody(title);
     }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/BookService.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/BookService.java?rev=1476540&r1=1476539&r2=1476540&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/BookService.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/BookService.java
Sat Apr 27 09:17:50 2013
@@ -18,7 +18,7 @@ package org.apache.camel.spring.intercep
 
 import javax.sql.DataSource;
 
-import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+import org.springframework.jdbc.core.JdbcTemplate;
 
 /**
  * Used for unit testing
@@ -26,13 +26,13 @@ import org.springframework.jdbc.core.sim
 // START SNIPPET: e1
 public class BookService {
 
-    private SimpleJdbcTemplate jdbc;
+    private JdbcTemplate jdbc;
 
     public BookService() {
     }
 
     public void setDataSource(DataSource ds) {
-        jdbc = new SimpleJdbcTemplate(ds);
+        jdbc = new JdbcTemplate(ds);
     }
 
     public void orderBook(String title) throws Exception {

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java?rev=1476540&r1=1476539&r2=1476540&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedPropagationTransactedTest.java
Sat Apr 27 09:17:50 2013
@@ -24,14 +24,14 @@ import org.apache.camel.spring.SpringRou
 import org.apache.camel.spring.SpringTestSupport;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+import org.springframework.jdbc.core.JdbcTemplate;
 
 /**
  * For testing with mixed transacted propagation (required, requires new)
  */
 public class MixedPropagationTransactedTest extends SpringTestSupport {
 
-    protected SimpleJdbcTemplate jdbc;
+    protected JdbcTemplate jdbc;
     protected boolean useTransactionErrorHandler = true;
 
     protected AbstractXmlApplicationContext createApplicationContext() {
@@ -45,7 +45,7 @@ public class MixedPropagationTransactedT
 
         // create database and insert dummy data
         final DataSource ds = getMandatoryBean(DataSource.class, "dataSource");
-        jdbc = new SimpleJdbcTemplate(ds);
+        jdbc = new JdbcTemplate(ds);
     }
 
     public void testRequiredOnly() throws Exception {



Mime
View raw message