camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1241259 - /camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
Date Mon, 06 Feb 2012 23:26:38 GMT
Author: hadrian
Date: Mon Feb  6 23:26:38 2012
New Revision: 1241259

URL: http://svn.apache.org/viewvc?rev=1241259&view=rev
Log:
Fix checkstyle and dependency problem from previous commit

Modified:
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java?rev=1241259&r1=1241258&r2=1241259&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
(original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
Mon Feb  6 23:26:38 2012
@@ -16,18 +16,16 @@
  */
 package org.apache.camel.itest.issues;
 
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
-
 import java.util.Collection;
 
-import javax.jms.ConnectionFactory;
+import javax.naming.Context;
 
-import org.apache.camel.CamelContext;
+import org.apache.activemq.camel.component.ActiveMQComponent;
 import org.apache.camel.Endpoint;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.CamelJmsTestHelper;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.jndi.JndiContext;
 import org.junit.Test;
 
 /**
@@ -52,13 +50,15 @@ public class RemoveEndpointsTest extends
         // assertNull(context.hasEndpoint("jms://topic:bar"));
     }
 
-    protected CamelContext createCamelContext() throws Exception {
-        CamelContext camelContext = super.createCamelContext();
-
-        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
-        camelContext.addComponent("jms", jmsComponentAutoAcknowledge(connectionFactory));
+    @Override
+    protected Context createJndiContext() throws Exception {
+        JndiContext answer = new JndiContext();
 
-        return camelContext;
+        // add ActiveMQ with embedded broker
+        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
+        amq.setCamelContext(context);
+        answer.bind("jms", amq);
+        return answer;
     }
 
     @Override



Mime
View raw message