You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/09/02 06:18:18 UTC
[08/15] Remove the code of camel-netty4 and
camel-example-servlet-tomcat-blueprintweb which we don't want to ship within
Camel 2.12.0
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTextlineInOutTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTextlineInOutTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTextlineInOutTest.java
deleted file mode 100644
index 0020a99..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTextlineInOutTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-/**
- * @version
- */
-public class NettyTextlineInOutTest extends BaseNettyTest {
-
- @Test
- public void testTextlineInOut() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
-
- String reply = template.requestBody("netty4:tcp://localhost:{{port}}?textline=true&sync=true", "Hello World", String.class);
- assertEquals("Bye World", reply);
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("netty4:tcp://localhost:{{port}}?textline=true&sync=true")
- // body should be a String when using textline codec
- .validate(body().isInstanceOf(String.class))
- .to("mock:result")
- .transform(body().regexReplaceAll("Hello", "Bye"));
- }
- };
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java
deleted file mode 100644
index 3127b98..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import java.nio.charset.Charset;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-/**
- * @version
- */
-public class NettyTransferExchangeOptionTest extends BaseNettyTest {
-
- @Test
- public void testNettyTransferExchangeOptionWithoutException() throws Exception {
- Exchange exchange = sendExchange(false);
- assertExchange(exchange, false);
- }
-
- @Test
- public void testNettyTransferExchangeOptionWithException() throws Exception {
- Exchange exchange = sendExchange(true);
- assertExchange(exchange, true);
- }
-
- private Exchange sendExchange(boolean setException) throws Exception {
- Endpoint endpoint = context.getEndpoint("netty4:tcp://localhost:{{port}}?transferExchange=true");
- Exchange exchange = endpoint.createExchange();
-
- Message message = exchange.getIn();
- message.setBody("Hello!");
- message.setHeader("cheese", "feta");
- exchange.setProperty("ham", "old");
- exchange.setProperty("setException", setException);
-
- Producer producer = endpoint.createProducer();
- producer.start();
-
- // ensure to stop producer after usage
- try {
- producer.process(exchange);
- } finally {
- producer.stop();
- }
-
- return exchange;
- }
-
- private void assertExchange(Exchange exchange, boolean hasFault) {
- if (!hasFault) {
- Message out = exchange.getOut();
- assertNotNull(out);
- assertFalse(out.isFault());
- assertEquals("Goodbye!", out.getBody());
- assertEquals("cheddar", out.getHeader("cheese"));
- } else {
- Message fault = exchange.getOut();
- assertNotNull(fault);
- assertTrue(fault.isFault());
- assertNotNull(fault.getBody());
- assertTrue("Should get the InterrupteException exception", fault.getBody() instanceof InterruptedException);
- assertEquals("nihao", fault.getHeader("hello"));
- }
-
-
- // in should stay the same
- Message in = exchange.getIn();
- assertNotNull(in);
- assertEquals("Hello!", in.getBody());
- assertEquals("feta", in.getHeader("cheese"));
- // however the shared properties have changed
- assertEquals("fresh", exchange.getProperty("salami"));
- assertNull(exchange.getProperty("Charset"));
- }
-
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- public void configure() {
- from("netty4:tcp://localhost:{{port}}?transferExchange=true").process(new Processor() {
- public void process(Exchange e) throws InterruptedException {
- assertNotNull(e.getIn().getBody());
- assertNotNull(e.getIn().getHeaders());
- assertNotNull(e.getProperties());
- assertEquals("Hello!", e.getIn().getBody());
- assertEquals("feta", e.getIn().getHeader("cheese"));
- assertEquals("old", e.getProperty("ham"));
- assertEquals(ExchangePattern.InOut, e.getPattern());
- Boolean setException = (Boolean) e.getProperty("setException");
-
- if (setException) {
- e.getOut().setFault(true);
- e.getOut().setBody(new InterruptedException());
- e.getOut().setHeader("hello", "nihao");
- } else {
- e.getOut().setBody("Goodbye!");
- e.getOut().setHeader("cheese", "cheddar");
- }
- e.setProperty("salami", "fresh");
- e.setProperty("Charset", Charset.defaultCharset());
- }
- });
- }
- };
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPAsyncTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPAsyncTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPAsyncTest.java
deleted file mode 100644
index 1124e23..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPAsyncTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import java.io.FileInputStream;
-import java.io.InputStream;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.converter.IOConverter;
-import org.apache.camel.util.IOHelper;
-import org.junit.Test;
-
-public class NettyUDPAsyncTest extends BaseNettyTest {
-
- @EndpointInject(uri = "mock:result")
- protected MockEndpoint resultEndpoint;
-
- private void sendFile(String uri) throws Exception {
- template.send(uri, new Processor() {
- public void process(Exchange exchange) throws Exception {
- // Read from an input stream
- InputStream is = IOHelper.buffered(new FileInputStream("src/test/resources/test.txt"));
-
- byte buffer[] = IOConverter.toBytes(is);
- is.close();
-
- // Set the property of the charset encoding
- exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
- Message in = exchange.getIn();
- in.setBody(buffer);
- }
- });
- }
-
- @Test
- public void testUDPInOnlyWithNettyConsumer() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:result");
- mock.expectedMessageCount(1);
- sendFile("netty4:udp://localhost:{{port}}?sync=false");
- mock.assertIsSatisfied();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("netty4:udp://localhost:{{port}}?sync=false")
- .to("mock:result")
- .to("log:Message");
- }
- };
- }
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPLargeMessageInOnlyTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPLargeMessageInOnlyTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPLargeMessageInOnlyTest.java
deleted file mode 100644
index a213469..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPLargeMessageInOnlyTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class NettyUDPLargeMessageInOnlyTest extends BaseNettyTest {
-
- private byte[] getMessageBytes(int messageSize) {
- byte[] msgBytes = new byte[messageSize];
- for (int i = 0; i < messageSize; i++) {
- msgBytes[i] = 'A';
- }
- return msgBytes;
- }
-
- private void sendMessage(int messageSize) throws Exception {
- byte[] msgBytes = getMessageBytes(messageSize);
-
- assertEquals(msgBytes.length, messageSize);
- String message = new String(msgBytes);
-
- getMockEndpoint("mock:result").expectedBodiesReceived(message);
- template.sendBody("netty4:udp://localhost:{{port}}?sync=false", message);
- assertMockEndpointsSatisfied();
- }
-
- @Test
- public void testSend512Message() throws Exception {
- sendMessage(512);
- }
-
- @Test
- public void testSend768Message() throws Exception {
- sendMessage(768);
- }
-
- @Test
- public void testSend1024Message() throws Exception {
- sendMessage(1024);
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("netty4:udp://localhost:{{port}}?receiveBufferSizePredictor=2048&sync=false")
- .to("mock:result");
- }
- };
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPObjectSyncTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPObjectSyncTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPObjectSyncTest.java
deleted file mode 100644
index 5d2111d..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPObjectSyncTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class NettyUDPObjectSyncTest extends BaseNettyTest {
-
- @Test
- public void testUDPObjectInOutWithNettyConsumer() throws Exception {
- Poetry poetry = new Poetry();
- Poetry response = template.requestBody("netty4:udp://localhost:{{port}}?sync=true", poetry, Poetry.class);
- assertEquals("Dr. Sarojini Naidu", response.getPoet());
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("netty4:udp://localhost:{{port}}?sync=true")
- .process(new Processor() {
- public void process(Exchange exchange) throws Exception {
- Poetry poetry = (Poetry) exchange.getIn().getBody();
- poetry.setPoet("Dr. Sarojini Naidu");
- exchange.getOut().setBody(poetry);
- }
- });
- }
- };
- }
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPSyncTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPSyncTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPSyncTest.java
deleted file mode 100644
index b9ad248..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUDPSyncTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class NettyUDPSyncTest extends BaseNettyTest {
-
- @Test
- public void testUDPStringInOutWithNettyConsumer() throws Exception {
- for (int i = 0; i < 5; i++) {
- String response = template.requestBody(
- "netty4:udp://localhost:{{port}}?sync=true",
- "After the Battle of Thermopylae in 480 BC - Simonides of Ceos (c. 556 BC-468 BC), Greek lyric poet wrote ?", String.class);
- assertEquals("Go tell the Spartans, thou that passest by, That faithful to their precepts here we lie.", response);
- }
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("netty4:udp://localhost:{{port}}?sync=true")
- .process(new Processor() {
- public void process(Exchange exchange) throws Exception {
- exchange.getOut().setBody("Go tell the Spartans, thou that passest by, That faithful to their precepts here we lie.");
- }
- });
- }
- };
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUdpWithInOutUsingPlainSocketTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUdpWithInOutUsingPlainSocketTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUdpWithInOutUsingPlainSocketTest.java
deleted file mode 100644
index 7fafbd7..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUdpWithInOutUsingPlainSocketTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @version
- */
-public class NettyUdpWithInOutUsingPlainSocketTest extends BaseNettyTest {
- private static final Logger LOG = LoggerFactory.getLogger(NettyUdpWithInOutUsingPlainSocketTest.class);
-
- @Test
- public void testSendAndReceiveOnce() throws Exception {
- String out = sendAndReceiveUdpMessages("World");
- assertNotNull("should receive data", out);
- assertEquals("Hello World\n", out);
- }
-
- private String sendAndReceiveUdpMessages(String input) throws Exception {
- DatagramSocket socket = new DatagramSocket();
- InetAddress address = InetAddress.getByName("127.0.0.1");
-
- // must append delimiter
- byte[] data = (input + "\n").getBytes();
-
- DatagramPacket packet = new DatagramPacket(data, data.length, address, getPort());
- LOG.debug("+++ Sending data +++");
- socket.send(packet);
-
- Thread.sleep(1000);
-
- byte[] buf = new byte[128];
- DatagramPacket receive = new DatagramPacket(buf, buf.length, address, getPort());
- LOG.debug("+++ Receiving data +++");
- socket.receive(receive);
-
- socket.close();
-
- return new String(receive.getData(), 0, receive.getLength());
- }
-
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- public void configure() {
- from("netty4:udp://127.0.0.1:{{port}}?textline=true&sync=true").process(new Processor() {
- public void process(Exchange exchange) throws Exception {
- String s = exchange.getIn().getBody(String.class);
- LOG.debug("Server got: " + s);
- exchange.getOut().setBody("Hello " + s);
- }
- });
- }
- };
- }
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java
deleted file mode 100644
index 651e9de..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolManyRoutesTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.JndiRegistry;
-import org.jboss.netty.channel.socket.nio.BossPool;
-import org.jboss.netty.channel.socket.nio.WorkerPool;
-import org.junit.Test;
-
-/**
- * @version
- */
-public class NettyUseSharedWorkerThreadPoolManyRoutesTest extends BaseNettyTest {
-
- private JndiRegistry jndi;
- private BossPool sharedBoos;
- private WorkerPool sharedWorker;
- private int before;
-
- @Override
- protected boolean useJmx() {
- return true;
- }
-
- @Override
- public void setUp() throws Exception {
- before = Thread.activeCount();
- super.setUp();
- }
-
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- jndi = super.createRegistry();
- return jndi;
- }
-
- @Test
- public void testSharedThreadPool() throws Exception {
- int delta = Thread.activeCount() - before;
-
- log.info("Created threads {}", delta);
- assertTrue("There should not be created so many threads: " + delta, delta < 50);
-
- sharedWorker.shutdown();
- sharedBoos.shutdown();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- sharedWorker = new NettyWorkerPoolBuilder().withWorkerCount(10).build();
- jndi.bind("sharedWorker", sharedWorker);
- sharedBoos = new NettyServerBossPoolBuilder().withBossCount(20).build();
- jndi.bind("sharedBoss", sharedBoos);
-
- for (int i = 0; i < 100; i++) {
- from("netty4:tcp://localhost:" + getNextPort() + "?textline=true&sync=true&orderedThreadPoolExecutor=false"
- + "&bossPool=#sharedBoss&workerPool=#sharedWorker")
- .validate(body().isInstanceOf(String.class))
- .to("log:result")
- .to("mock:result")
- .transform(body().regexReplaceAll("Hello", "Bye"));
- }
- }
- };
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java
deleted file mode 100644
index 7a0b273..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyUseSharedWorkerThreadPoolTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.JndiRegistry;
-import org.jboss.netty.channel.socket.nio.WorkerPool;
-import org.junit.Test;
-
-/**
- * @version
- */
-public class NettyUseSharedWorkerThreadPoolTest extends BaseNettyTest {
-
- private JndiRegistry jndi;
- private WorkerPool sharedServer;
- private WorkerPool sharedClient;
- private int port;
- private int port2;
- private int port3;
-
- @Override
- protected boolean useJmx() {
- return true;
- }
-
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- jndi = super.createRegistry();
- return jndi;
- }
-
- @Test
- public void testSharedThreadPool() throws Exception {
- getMockEndpoint("mock:result").expectedMessageCount(30);
-
- for (int i = 0; i < 10; i++) {
- String reply = template.requestBody("netty4:tcp://localhost:" + port + "?textline=true&sync=true&workerPool=#sharedClientPool", "Hello World", String.class);
- assertEquals("Bye World", reply);
-
- reply = template.requestBody("netty4:tcp://localhost:" + port2 + "?textline=true&sync=true&workerPool=#sharedClientPool", "Hello Camel", String.class);
- assertEquals("Hi Camel", reply);
-
- reply = template.requestBody("netty4:tcp://localhost:" + port3 + "?textline=true&sync=true&workerPool=#sharedClientPool", "Hello Claus", String.class);
- assertEquals("Hej Claus", reply);
- }
-
- assertMockEndpointsSatisfied();
-
- sharedServer.shutdown();
- sharedClient.shutdown();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- // we have 3 routes, but lets try to have only 2 threads in the pool
- sharedServer = new NettyWorkerPoolBuilder().withWorkerCount(2).withName("NettyServer").build();
- jndi.bind("sharedServerPool", sharedServer);
- sharedClient = new NettyWorkerPoolBuilder().withWorkerCount(3).withName("NettyClient").build();
- jndi.bind("sharedClientPool", sharedClient);
-
- port = getPort();
- port2 = getNextPort();
- port3 = getNextPort();
-
- from("netty4:tcp://localhost:" + port + "?textline=true&sync=true&workerPool=#sharedServerPool&orderedThreadPoolExecutor=false")
- .validate(body().isInstanceOf(String.class))
- .to("log:result")
- .to("mock:result")
- .transform(body().regexReplaceAll("Hello", "Bye"));
-
- from("netty4:tcp://localhost:" + port2 + "?textline=true&sync=true&workerPool=#sharedServerPool&orderedThreadPoolExecutor=false")
- .validate(body().isInstanceOf(String.class))
- .to("log:result")
- .to("mock:result")
- .transform(body().regexReplaceAll("Hello", "Hi"));
-
- from("netty4:tcp://localhost:" + port3 + "?textline=true&sync=true&workerPool=#sharedServerPool&orderedThreadPoolExecutor=false")
- .validate(body().isInstanceOf(String.class))
- .to("log:result")
- .to("mock:result")
- .transform(body().regexReplaceAll("Hello", "Hej"));
- }
- };
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/Poetry.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/Poetry.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/Poetry.java
deleted file mode 100644
index 0781e71..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/Poetry.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import java.io.Serializable;
-
-public class Poetry implements Serializable {
- private static final long serialVersionUID = 1L;
- private String poet = "?";
- private String poem = "ONCE in the dream of a night I stood\n"
- + "Lone in the light of a magical wood,\n"
- + "Soul-deep in visions that poppy-like sprang;\n"
- + "And spirits of Truth were the birds that sang,\n"
- + "And spirits of Love were the stars that glowed,\n"
- + "And spirits of Peace were the streams that flowed\n"
- + "In that magical wood in the land of sleep."
- + "\n"
- + "Lone in the light of that magical grove,\n"
- + "I felt the stars of the spirits of Love\n"
- + "Gather and gleam round my delicate youth,\n"
- + "And I heard the song of the spirits of Truth;\n"
- + "To quench my longing I bent me low\n"
- + "By the streams of the spirits of Peace that flow\n"
- + "In that magical wood in the land of sleep.";
-
- public String getPoet() {
- return poet;
- }
-
- public void setPoet(String poet) {
- this.poet = poet;
- }
-
- public String getPoem() {
- return poem;
- }
-
- public void setPoem(String poem) {
- this.poem = poem;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java
deleted file mode 100644
index bcedb10..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * @version
- */
-public class SpringNettyUseSharedWorkerThreadPoolTest extends CamelSpringTestSupport {
-
- @Test
- public void testSharedThreadPool() throws Exception {
- getMockEndpoint("mock:result").expectedMessageCount(30);
-
- for (int i = 0; i < 10; i++) {
- String reply = template.requestBody("netty4:tcp://localhost:5021?textline=true&sync=true", "Hello World", String.class);
- assertEquals("Hello World", reply);
-
- reply = template.requestBody("netty4:tcp://localhost:5022?textline=true&sync=true", "Hello Camel", String.class);
- assertEquals("Hello Camel", reply);
-
- reply = template.requestBody("netty4:tcp://localhost:5023?textline=true&sync=true", "Hello Claus", String.class);
- assertEquals("Hello Claus", reply);
- }
-
- assertMockEndpointsSatisfied();
- }
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml");
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflicts2Test.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflicts2Test.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflicts2Test.java
deleted file mode 100644
index d44281a..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflicts2Test.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.util.Arrays;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.JndiRegistry;
-import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
-import org.junit.Test;
-
-/**
- *
- */
-public class UnsharableCodecsConflicts2Test extends BaseNettyTest {
-
- static final byte[] LENGTH_HEADER = {0x00, 0x00, 0x40, 0x00}; // 16384 bytes
-
- private Processor processor = new P();
- private int port;
-
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry registry = super.createRegistry();
-
- // create a single decoder
- ChannelHandlerFactory decoder = ChannelHandlerFactories.newLengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4);
- registry.bind("length-decoder", decoder);
-
- return registry;
- }
-
- @Test
- public void unsharableCodecsConflictsTest() throws Exception {
- byte[] data1 = new byte[8192];
- byte[] data2 = new byte[16383];
- Arrays.fill(data1, (byte) 0x38);
- Arrays.fill(data2, (byte) 0x39);
- byte[] body1 = (new String(LENGTH_HEADER) + new String(data1)).getBytes();
- byte[] body2 = (new String(LENGTH_HEADER) + new String(data2)).getBytes();
-
- MockEndpoint mock = getMockEndpoint("mock:result");
- mock.expectedBodiesReceived(new String(data2) + "9");
-
- Socket client1 = getSocket("localhost", port);
- Socket client2 = getSocket("localhost", port);
-
- // use two clients to send to the same server at the same time
- try {
- sendBuffer(body2, client2);
- sendBuffer(body1, client1);
- sendBuffer(new String("9").getBytes(), client2);
- } catch (Exception e) {
- log.error("", e);
- } finally {
- client1.close();
- client2.close();
- }
-
- mock.assertIsSatisfied();
- }
-
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- public void configure() throws Exception {
- port = getPort();
-
- from("netty4:tcp://localhost:{{port}}?decoder=#length-decoder&sync=false")
- .process(processor)
- .to("mock:result");
- }
- };
- }
-
- private static Socket getSocket(String host, int port) throws IOException {
- Socket s = new Socket(host, port);
- s.setSoTimeout(60000);
- return s;
- }
-
- public static void sendBuffer(byte[] buf, Socket server) throws Exception {
- OutputStream netOut = server.getOutputStream();
- OutputStream dataOut = new BufferedOutputStream(netOut);
- try {
- dataOut.write(buf, 0, buf.length);
- dataOut.flush();
- } catch (Exception e) {
- server.close();
- throw e;
- }
- }
-
- class P implements Processor {
-
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getOut().setBody(
- new String(((BigEndianHeapChannelBuffer) exchange.getIn()
- .getBody()).array()));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflictsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflictsTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflictsTest.java
deleted file mode 100644
index 3d301ab..0000000
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/UnsharableCodecsConflictsTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.camel.component.netty4;
-
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.net.Socket;
-import java.util.Arrays;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.util.IOHelper;
-import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
-import org.junit.Test;
-
-/**
- *
- */
-public class UnsharableCodecsConflictsTest extends BaseNettyTest {
-
- static final byte[] LENGTH_HEADER = {0x00, 0x00, 0x40, 0x00}; // 4096 bytes
-
- private Processor processor = new P();
-
- private int port1;
- private int port2;
-
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry registry = super.createRegistry();
-
- // we can share the decoder between multiple netty consumers, because they have the same configuration
- // and we use a ChannelHandlerFactory
- ChannelHandlerFactory decoder = ChannelHandlerFactories.newLengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4);
- registry.bind("length-decoder", decoder);
- registry.bind("length-decoder2", decoder);
-
- return registry;
- }
-
- @Test
- public void canSupplyMultipleCodecsToEndpointPipeline() throws Exception {
- byte[] sPort1 = new byte[8192];
- byte[] sPort2 = new byte[16383];
- Arrays.fill(sPort1, (byte) 0x38);
- Arrays.fill(sPort2, (byte) 0x39);
- byte[] bodyPort1 = (new String(LENGTH_HEADER) + new String(sPort1)).getBytes();
- byte[] bodyPort2 = (new String(LENGTH_HEADER) + new String(sPort2)).getBytes();
-
- MockEndpoint mock = getMockEndpoint("mock:result");
- mock.expectedBodiesReceived(new String(sPort2) + "9");
-
- Socket server1 = getSocket("localhost", port1);
- Socket server2 = getSocket("localhost", port2);
-
- try {
- sendSopBuffer(bodyPort2, server2);
- sendSopBuffer(bodyPort1, server1);
- sendSopBuffer(new String("9").getBytes(), server2);
- } catch (Exception e) {
- log.error("", e);
- } finally {
- server1.close();
- server2.close();
- }
-
- mock.assertIsSatisfied();
- }
-
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- public void configure() throws Exception {
- port1 = getPort();
- port2 = getNextPort();
-
- from("netty4:tcp://localhost:" + port1 + "?decoder=#length-decoder&sync=false")
- .process(processor);
-
- from("netty4:tcp://localhost:" + port2 + "?decoder=#length-decoder2&sync=false")
- .process(processor)
- .to("mock:result");
- }
- };
- }
-
- private static Socket getSocket(String host, int port) throws IOException {
- Socket s = new Socket(host, port);
- s.setSoTimeout(60000);
- return s;
- }
-
- public static void sendSopBuffer(byte[] buf, Socket server) throws Exception {
- BufferedOutputStream dataOut = IOHelper.buffered(server.getOutputStream());
- try {
- dataOut.write(buf, 0, buf.length);
- dataOut.flush();
- } catch (Exception e) {
- IOHelper.close(dataOut);
- server.close();
- throw e;
- }
- }
-
- class P implements Processor {
-
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getOut().setBody(new String(((BigEndianHeapChannelBuffer) exchange.getIn().getBody()).array()));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/resources/keystore.jks
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/resources/keystore.jks b/components/camel-netty4/src/test/resources/keystore.jks
deleted file mode 100644
index 78e8571..0000000
Binary files a/components/camel-netty4/src/test/resources/keystore.jks and /dev/null differ
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/resources/log4j.properties b/components/camel-netty4/src/test/resources/log4j.properties
deleted file mode 100644
index 660ba42..0000000
--- a/components/camel-netty4/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-## ------------------------------------------------------------------------
-## 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.
-## ------------------------------------------------------------------------
-
-#
-# The logging properties used for eclipse testing, We want to see debug output on the console.
-#
-log4j.rootLogger=INFO, file
-
-# uncomment the following to enable camel debugging
-#log4j.logger.org.apache.camel.component.netty4=TRACE
-#log4j.logger.org.apache.camel=DEBUG
-#log4j.logger.io.netty=TRACE
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-#log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
-log4j.appender.out.layout.ConversionPattern=%d [%-35.35t] %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.file.file=target/camel-netty4-test.log
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml b/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml
deleted file mode 100644
index 359142f..0000000
--- a/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/SpringNettyUseSharedWorkerThreadPoolTest.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- use the worker pool builder to create to help create the shared thread pool -->
- <bean id="poolBuilder" class="org.apache.camel.component.netty4.NettyWorkerPoolBuilder">
- <property name="workerCount" value="2"/>
- </bean>
-
- <!-- the shared worker thread pool -->
- <bean id="sharedPool" class="org.jboss.netty.channel.socket.nio.WorkerPool"
- factory-bean="poolBuilder" factory-method="build" destroy-method="shutdown">
- </bean>
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="netty4:tcp://localhost:5021?textline=true&sync=true&workerPool=#sharedPool&orderedThreadPoolExecutor=false"/>
- <to uri="log:result"/>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="netty4:tcp://localhost:5022?textline=true&sync=true&workerPool=#sharedPool&orderedThreadPoolExecutor=false"/>
- <to uri="log:result"/>
- <to uri="mock:result"/>
- </route>
-
- <route>
- <from uri="netty4:tcp://localhost:5023?textline=true&sync=true&workerPool=#sharedPool&orderedThreadPoolExecutor=false"/>
- <to uri="log:result"/>
- <to uri="mock:result"/>
- </route>
- </camelContext>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/multiple-codecs.xml
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/multiple-codecs.xml b/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/multiple-codecs.xml
deleted file mode 100644
index cc31bce..0000000
--- a/components/camel-netty4/src/test/resources/org/apache/camel/component/netty4/multiple-codecs.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- START SNIPPET: routes -->
- <camelContext id="multiple-netty-codecs-context" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:multiple-codec"/>
- <to uri="netty4:tcp://localhost:5150?encoders=#encoders&sync=false"/>
- </route>
- <route>
- <from uri="netty4:tcp://localhost:5150?decoders=#length-decoder,#string-decoder&sync=false"/>
- <to uri="mock:multiple-codec"/>
- </route>
- </camelContext>
- <!-- END SNIPPET: routes -->
-
- <!-- START SNIPPET: registry-beans -->
- <util:list id="decoders" list-class="java.util.LinkedList">
- <bean class="org.apache.camel.component.netty4.ChannelHandlerFactories" factory-method="newLengthFieldBasedFrameDecoder">
- <constructor-arg value="1048576"/>
- <constructor-arg value="0"/>
- <constructor-arg value="4"/>
- <constructor-arg value="0"/>
- <constructor-arg value="4"/>
- </bean>
- <bean class="org.jboss.netty.handler.codec.string.StringDecoder"/>
- </util:list>
-
- <util:list id="encoders" list-class="java.util.LinkedList">
- <bean class="org.jboss.netty.handler.codec.frame.LengthFieldPrepender">
- <constructor-arg value="4"/>
- </bean>
- <bean class="org.jboss.netty.handler.codec.string.StringEncoder"/>
- </util:list>
-
- <bean id="length-encoder" class="org.jboss.netty.handler.codec.frame.LengthFieldPrepender">
- <constructor-arg value="4"/>
- </bean>
- <bean id="string-encoder" class="org.jboss.netty.handler.codec.string.StringEncoder"/>
-
- <bean id="length-decoder" class="org.apache.camel.component.netty4.ChannelHandlerFactories" factory-method="newLengthFieldBasedFrameDecoder">
- <constructor-arg value="1048576"/>
- <constructor-arg value="0"/>
- <constructor-arg value="4"/>
- <constructor-arg value="0"/>
- <constructor-arg value="4"/>
- </bean>
- <bean id="string-decoder" class="org.jboss.netty.handler.codec.string.StringDecoder"/>
- <!-- START SNIPPET: registry-beans -->
-
-</beans>
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/camel-netty4/src/test/resources/test.txt
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/resources/test.txt b/components/camel-netty4/src/test/resources/test.txt
deleted file mode 100644
index b8713e9..0000000
--- a/components/camel-netty4/src/test/resources/test.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Song Of A Dream
-by: Dr Sarojini Naidu
-
-ONCE in the dream of a night I stood
-Lone in the light of a magical wood,
-Soul-deep in visions that poppy-like sprang;
-And spirits of Truth were the birds that sang,
-And spirits of Love were the stars that glowed,
-And spirits of Peace were the streams that flowed
-In that magical wood in the land of sleep.
-
-
-Lone in the light of that magical grove,
-I felt the stars of the spirits of Love
-Gather and gleam round my delicate youth,
-And I heard the song of the spirits of Truth;
-To quench my longing I bent me low
-By the streams of the spirits of Peace that flow
-In that magical wood in the land of sleep.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index ad6c973..f2a704e 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -131,7 +131,6 @@
<module>camel-mybatis</module>
<module>camel-nagios</module>
<module>camel-netty</module>
- <module>camel-netty4</module>
<module>camel-netty-http</module>
<module>camel-ognl</module>
<module>camel-paxlogging</module>
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/README.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/README.txt b/examples/camel-example-servlet-tomcat-blueprintweb/README.txt
deleted file mode 100644
index 9979bfc..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/README.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Camel Servlet and Apache Tomcat using Blueprint Web example
-===========================================================
-
-An example which shows how to use the Camel Servlet with Apache Tomcat.
-
-You will need to package this example first:
- mvn package
-
-To run the example deploy it in Apache Tomcat by copying the .war to the
-deploy folder of Apache Tomcat.
-
-And then hit this url from a webbrowser which has further
-instructions (use correct version number)
- http://localhost:8080/camel-example-servlet-tomcat-blueprintweb-{version}
-
-The servlet is located at (use correct version number)
- http://localhost:8080/camel-example-servlet-tomcat-blueprintweb-{version}/camel/hello
-
-This example is documented at
- http://camel.apache.org/servlet-tomcat-blueprintweb-example.html
-
-If you hit any problems please let us know on the Camel Forums
- http://camel.apache.org/discussion-forums.html
-
-Please help us make Apache Camel better - we appreciate any feedback you may
-have. Enjoy!
-
-------------------------
-The Camel riders!
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/pom.xml b/examples/camel-example-servlet-tomcat-blueprintweb/pom.xml
deleted file mode 100755
index fc7d962..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>examples</artifactId>
- <version>2.12.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-servlet-tomcat-blueprintweb</artifactId>
- <name>Camel :: Example :: Servlet Tomcat :: Blueprint Web</name>
- <description>An example using Camel Servlet with Apache Tomcat using Blueprint Web</description>
- <packaging>war</packaging>
-
- <dependencies>
-
- <!-- camel -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-blueprint</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-servlet</artifactId>
- </dependency>
-
- <!-- blueprint web -->
- <dependency>
- <groupId>org.apache.aries.blueprint</groupId>
- <artifactId>org.apache.aries.blueprint.web</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/LICENSE.txt b/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/NOTICE.txt b/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/blueprint.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/blueprint.xml b/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/blueprint.xml
deleted file mode 100755
index 6de33d2..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/blueprint.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<!-- START SNIPPET: e1 -->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
- <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
- <route>
- <!-- incoming requests from the servlet is routed -->
- <from uri="servlet:///hello"/>
- <choice>
- <when>
- <!-- is there a header with the key name? -->
- <header>name</header>
- <!-- yes so return back a message to the user -->
- <transform>
- <simple>Hello ${header.name} how are you?</simple>
- </transform>
- </when>
- <otherwise>
- <!-- if no name parameter then output a syntax to the user -->
- <transform>
- <constant>Add a name parameter to uri, eg ?name=foo</constant>
- </transform>
- </otherwise>
- </choice>
- </route>
-
- </camelContext>
-
-</blueprint>
-<!-- END SNIPPET: e1 -->
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/log4j.properties b/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/log4j.properties
deleted file mode 100755
index a6b00bb..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-## ------------------------------------------------------------------------
-## 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.
-## ------------------------------------------------------------------------
-
-# default properties to initialise log4j
-log4j.rootLogger=INFO, console
-
-# settings for specific packages
-#log4j.logger.org.apache.camel.component.http=DEBUG
-#log4j.logger.org.apache.camel.component.servlet=DEBUG
-#log4j.logger.org.apache.camel=DEBUG
-
-# Console appender
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/WEB-INF/web.xml b/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/WEB-INF/web.xml
deleted file mode 100755
index 7783fc0..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- 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.
--->
-
-<!-- START SNIPPET: e1 -->
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>Camel Tomcat Blueprint Web Application</display-name>
-
- <!-- the listener that kick-starts Blueprint web -->
- <listener>
- <listener-class>org.apache.aries.blueprint.web.BlueprintContextListener</listener-class>
- </listener>
-
- <!-- Camel servlet -->
- <servlet>
- <servlet-name>CamelServlet</servlet-name>
- <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Camel servlet mapping -->
- <servlet-mapping>
- <servlet-name>CamelServlet</servlet-name>
- <url-pattern>/camel/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-<!-- END SNIPPET: e1 -->
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/index.html b/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/index.html
deleted file mode 100644
index 49624a3..0000000
--- a/examples/camel-example-servlet-tomcat-blueprintweb/src/main/webapp/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
- 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.
--->
-<html>
-
-<body>
-<h2>Camel Servlet and Apache Tomcat example using Blueprint Web</h2>
-
-This example shows how to use route messages in Apache Tomcat using servlets with Apache Camel.
-<br/>
-<br/>
-To get started click <a href="camel/hello">this link</a>.
-<br/>
-<br/>
-This example is documented at
-<a href="http://camel.apache.org/servlet-tomcat-example-blueprintweb.html">servlet tomcat blueprintweb example</a>
-
-<br/>
-If you hit any problems please let us know on the
-<a href="http://camel.apache.org/discussion-forums.html">Camel Forums</a>
-<br/>
-<br/>
-Please help us make Apache Camel better - we appreciate any feedback you may
-have. Enjoy!
-<br/>
-<br/>
-The Camel riders!
-</body>
-
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/5fe85483/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 172f26f..1085720 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -64,7 +64,6 @@
<module>camel-example-restlet-jdbc</module>
<module>camel-example-route-throttling</module>
<module>camel-example-servlet-tomcat</module>
- <module>camel-example-servlet-tomcat-blueprintweb</module>
<module>camel-example-servlet-tomcat-no-spring</module>
<module>camel-example-simplejirabot</module>
<module>camel-example-spring</module>