You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/09/16 08:06:53 UTC
svn commit: r997592 -
/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
Author: davsclaus
Date: Thu Sep 16 06:06:52 2010
New Revision: 997592
URL: http://svn.apache.org/viewvc?rev=997592&view=rev
Log:
Fixed compiling with Spring 2.x
Modified:
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java?rev=997592&r1=997591&r2=997592&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java Thu Sep 16 06:06:52 2010
@@ -94,7 +94,8 @@ public class JpaRouteTest extends OSGiIn
}
private void assertEntityInDB() throws Exception {
- jpaTemplate = applicationContext.getBean("jpaTemplate", JpaTemplate.class);
+ // must type cast with Spring 2.x
+ jpaTemplate = (JpaTemplate) applicationContext.getBean("jpaTemplate");
List list = jpaTemplate.find(SELECT_ALL_STRING);
assertEquals(1, list.size());
@@ -103,7 +104,8 @@ public class JpaRouteTest extends OSGiIn
}
protected void cleanupRepository() {
- jpaTemplate = applicationContext.getBean("jpaTemplate", JpaTemplate.class);
+ // must type cast with Spring 2.x
+ jpaTemplate = (JpaTemplate) applicationContext.getBean("jpaTemplate");
TransactionTemplate transactionTemplate = new TransactionTemplate();
transactionTemplate.setTransactionManager(new JpaTransactionManager(jpaTemplate.getEntityManagerFactory()));