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/08/01 14:00:37 UTC
[camel] 01/03: CAMEL-13801 - camel3 - Use @BindToRegistry wherever
possible, Camel-Stax
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 3d213d511ac1718d76192ca2f365b927b9860c54
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Aug 1 15:59:16 2019 +0200
CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Stax
---
.../org/apache/camel/component/stax/StAXComponentRefTest.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/components/camel-stax/src/test/java/org/apache/camel/component/stax/StAXComponentRefTest.java b/components/camel-stax/src/test/java/org/apache/camel/component/stax/StAXComponentRefTest.java
index 1cef80c..196f0a8 100644
--- a/components/camel-stax/src/test/java/org/apache/camel/component/stax/StAXComponentRefTest.java
+++ b/components/camel-stax/src/test/java/org/apache/camel/component/stax/StAXComponentRefTest.java
@@ -15,6 +15,7 @@
* limitations under the License.
*/
package org.apache.camel.component.stax;
+import org.apache.camel.BindToRegistry;
import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
@@ -30,6 +31,9 @@ public class StAXComponentRefTest extends CamelTestSupport {
@EndpointInject("mock:records")
private MockEndpoint recordsEndpoint;
+
+ @BindToRegistry("myHandler")
+ private CountingHandler handler =new CountingHandler();
@BeforeClass
public static void initRouteExample() {
@@ -37,13 +41,6 @@ public class StAXComponentRefTest extends CamelTestSupport {
}
@Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry jndi = super.createRegistry();
- jndi.bind("myHandler", new CountingHandler());
- return jndi;
- }
-
- @Override
public RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override