diff --git a/activemq-optional/pom.xml b/activemq-optional/pom.xml index 3582e6ffbc..0978c009b6 100755 --- a/activemq-optional/pom.xml +++ b/activemq-optional/pom.xml @@ -143,7 +143,31 @@ spring-beans test - + + org.springframework + spring-context + test + + + org.springframework + spring-aop + test + + + org.springframework + spring-jms + test + + + org.springframework + spring-jms + test + + + org.apache.xbean + xbean-spring + test + org.codehaus.jettison jettison diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java index bf44d44d75..b44a82a186 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java @@ -21,7 +21,7 @@ import java.io.DataOutputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; @@ -187,8 +187,7 @@ public class HttpTunnelServlet extends HttpServlet { } protected BlockingQueueTransport createTransportChannel() { - // return new BlockingQueueTransport(new LinkedBlockingQueue()); - return new BlockingQueueTransport(new ArrayBlockingQueue(10)); + return new BlockingQueueTransport(new LinkedBlockingQueue()); } protected TextWireFormat createWireFormat() { diff --git a/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java b/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java index 33090fe683..4ebc8fd0b3 100644 --- a/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java +++ b/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java @@ -1,3 +1,19 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.activemq.transport.http; import javax.jms.Connection; diff --git a/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpSpringTest.java b/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpSpringTest.java new file mode 100644 index 0000000000..0eba5d6ba7 --- /dev/null +++ b/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpSpringTest.java @@ -0,0 +1,28 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.transport.http; + +import org.apache.activemq.spring.SpringTestSupport; + +public class HttpSpringTest extends SpringTestSupport { + + public void testHttpTransportWithSpring() throws Exception { + String config = "spring-http.xml"; + assertSenderConfig(config); + } + +} diff --git a/activemq-optional/src/test/resources/spring-http.xml b/activemq-optional/src/test/resources/spring-http.xml new file mode 100644 index 0000000000..e66d49c6ff --- /dev/null +++ b/activemq-optional/src/test/resources/spring-http.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + + + + + + + + + + + +