You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/07/29 06:48:41 UTC
[camel] 01/02: Camel-Jdbc - Use BindToRegistry annotation wherever
possible
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit ba0d5f4e9addc43c5678d6826913d0e2a428a849
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 29 08:46:24 2019 +0200
Camel-Jdbc - Use BindToRegistry annotation wherever possible
---
.../apache/camel/component/jdbc/AbstractJdbcTestSupport.java | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/AbstractJdbcTestSupport.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/AbstractJdbcTestSupport.java
index 6d6dc28..b8274e9 100644
--- a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/AbstractJdbcTestSupport.java
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/AbstractJdbcTestSupport.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.jdbc;
+import org.apache.camel.BindToRegistry;
import org.apache.camel.impl.JndiRegistry;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.After;
@@ -29,17 +30,9 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
*/
public abstract class AbstractJdbcTestSupport extends CamelTestSupport {
+ @BindToRegistry("testdb")
protected EmbeddedDatabase db;
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- // START SNIPPET: register
- JndiRegistry reg = super.createRegistry();
- reg.bind("testdb", db);
- return reg;
- // END SNIPPET: register
- }
-
@Before
@Override
public void setUp() throws Exception {