Updated Branches:
  refs/heads/master 3a77dc861 -> d4adc1be1

Removed the usage of the IOHelper.close() utility for closing Spring 
ApplicationContext so that Spring 3.1.x is still supported.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d4adc1be
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d4adc1be
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d4adc1be

Branch: refs/heads/master
Commit: d4adc1be1d8ddd5c99e7b516c05cd382a08990ba
Parents: 3a77dc8
Author: Babak Vahdat <bvah...@apache.org>
Authored: Thu May 16 02:07:42 2013 +0200
Committer: Babak Vahdat <bvah...@apache.org>
Committed: Thu May 16 02:07:42 2013 +0200

----------------------------------------------------------------------
 .../SpringQuartzPersistentStoreRestartAppTest.java |    4 +-
 .../camel/spring/DefaultStreamCachingTest.java     |    3 +-
 .../camel/spring/config/AnotherCamelProxyTest.java |    3 +-
 .../spring/config/CamelContextFactoryBeanTest.java |    3 +-
 .../apache/camel/spring/config/CamelProxyTest.java |    3 +-
 .../spring/config/CamelProxyUsingRefTest.java      |    3 +-
 .../camel/spring/config/RouteBuilderRefTest.java   |    3 +-
 .../config/scan/SpringComponentScanTest.java       |    3 +-
 ...ingComponentScanWithDeprecatedPackagesTest.java |    3 +-
 .../src/main/resources/etc/MailBody.vm             |   54 +++++++-------
 .../src/main/resources/etc/MailBody.vm             |   54 +++++++-------
 .../apache/camel/example/client/CamelClient.java   |    3 +-
 .../camel/example/client/CamelFileClient.java      |    3 +-
 .../example/spring/javaconfig/IntegrationTest.java |    3 +-
 .../apache/camel/example/client/CamelClient.java   |    3 +-
 .../camel/example/client/CamelClientEndpoint.java  |    3 +-
 .../camel/example/client/CamelClientRemoting.java  |    3 +-
 .../customerrelations/CustomerServicesTest.java    |    8 ++-
 .../CustomerServicesWsAddressingTest.java          |    8 ++-
 .../resources/META-INF/javamail.default.providers  |   44 ++++++------
 .../services/org/apache/camel/component/__scheme__ |   34 +++++-----
 .../services/org/apache/camel/component/__scheme__ |   34 +++++-----
 22 files changed, 138 insertions(+), 144 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartAppTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartAppTest.java
 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartAppTest.java
index b080b4e..d80a448 100644
--- 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartAppTest.java
+++ 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartAppTest.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.quartz;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.TestSupport;
-import org.apache.camel.util.IOHelper;
 import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -73,7 +72,8 @@ public class SpringQuartzPersistentStoreRestartAppTest 
extends TestSupport {
         app2.stop();
 
         // we're done so let's properly close the application contexts
-        IOHelper.close(app, app2);
+        app.close();
+        app2.close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
index c017729..2facd10 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
@@ -18,7 +18,6 @@ package org.apache.camel.spring;
 
 import junit.framework.TestCase;
 import org.apache.camel.CamelContext;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -31,7 +30,7 @@ public class DefaultStreamCachingTest extends TestCase {
         assertFalse("StreamCaching should not be enabled", 
camelContext.isStreamCaching());
 
         // we're done so let's properly close the application context
-        IOHelper.close(appContext);
+        appContext.close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java
index 21cf67e..ce2a478 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/AnotherCamelProxyTest.java
@@ -18,7 +18,6 @@ package org.apache.camel.spring.config;
 
 import junit.framework.TestCase;
 
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -37,7 +36,7 @@ public class AnotherCamelProxyTest extends TestCase {
         assertEquals("Bye Camel", reply);
 
         // we're done so let's properly close the application context
-        IOHelper.close(ac);
+        ac.close();
         // END SNIPPET: e1
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
index c1fc216..796e140 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.Route;
 import org.apache.camel.impl.EventDrivenConsumerRoute;
 import org.apache.camel.management.JmxSystemPropertyKeys;
 import org.apache.camel.spring.SpringCamelContext;
-import org.apache.camel.util.IOHelper;
 import org.springframework.beans.factory.support.BeanDefinitionRegistry;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.support.AbstractApplicationContext;
@@ -55,7 +54,7 @@ public class CamelContextFactoryBeanTest extends 
XmlConfigTestSupport {
 
         if (applicationContext != null) {
             // we're done so let's properly close the application context
-            IOHelper.close(applicationContext);
+            applicationContext.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
index 79b63e1..65f6b81 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
@@ -19,7 +19,6 @@ package org.apache.camel.spring.config;
 import org.apache.camel.TestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spring.SpringCamelContext;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -54,7 +53,7 @@ public class CamelProxyTest extends TestSupport {
         result.assertIsSatisfied();
 
         // we're done so let's properly close the application context
-        IOHelper.close(ac);
+        ac.close();
     }
     
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyUsingRefTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyUsingRefTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyUsingRefTest.java
index 12a0462..3151288 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyUsingRefTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyUsingRefTest.java
@@ -18,7 +18,6 @@ package org.apache.camel.spring.config;
 
 import junit.framework.TestCase;
 
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -36,7 +35,7 @@ public class CamelProxyUsingRefTest extends TestCase {
         assertEquals("Hello World", reply);
 
         // we're done so let's properly close the application context
-        IOHelper.close(ac);
+        ac.close();
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/RouteBuilderRefTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/RouteBuilderRefTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/RouteBuilderRefTest.java
index 9a00735..d6a5e13 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/RouteBuilderRefTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/RouteBuilderRefTest.java
@@ -17,7 +17,6 @@
 package org.apache.camel.spring.config;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -33,7 +32,7 @@ public class RouteBuilderRefTest extends XmlConfigTestSupport 
{
         assertValidContext(context);
 
         // we're done so let's properly close the application context
-        IOHelper.close(applicationContext);
+        applicationContext.close();
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanTest.java
index fa3b91e..2f78105 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanTest.java
@@ -21,7 +21,6 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -44,7 +43,7 @@ public class SpringComponentScanTest extends 
ContextTestSupport {
     protected void tearDown() throws Exception {
         if (applicationContext != null) {
             // we're done so let's properly close the application context
-            IOHelper.close(applicationContext);
+            applicationContext.close();
         }
 
         super.tearDown();

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanWithDeprecatedPackagesTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanWithDeprecatedPackagesTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanWithDeprecatedPackagesTest.java
index 0b224f6..9fadf4a 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanWithDeprecatedPackagesTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/scan/SpringComponentScanWithDeprecatedPackagesTest.java
@@ -20,7 +20,6 @@ package org.apache.camel.spring.config.scan;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -40,7 +39,7 @@ public class SpringComponentScanWithDeprecatedPackagesTest 
extends ContextTestSu
     protected void tearDown() throws Exception {
         if (applicationContext != null) {
             // we're done so let's properly close the application context
-            IOHelper.close(applicationContext);
+            applicationContext.close();
         }
 
         super.tearDown();

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-reportincident-wssecurity/src/main/resources/etc/MailBody.vm
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-reportincident-wssecurity/src/main/resources/etc/MailBody.vm
 
b/examples/camel-example-reportincident-wssecurity/src/main/resources/etc/MailBody.vm
index f3b0794..3a04f08 100644
--- 
a/examples/camel-example-reportincident-wssecurity/src/main/resources/etc/MailBody.vm
+++ 
b/examples/camel-example-reportincident-wssecurity/src/main/resources/etc/MailBody.vm
@@ -1,28 +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.
-## ---------------------------------------------------------------------------
-Incident $body.incidentId has been reported on the $body.incidentDate by 
$body.givenName $body.familyName.
-
-The person can be contacted by:
-- email: $body.email
-- phone: $body.phone
-
-Summary: $body.summary
-
-Details:
-$body.details
-
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+Incident $body.incidentId has been reported on the $body.incidentDate by 
$body.givenName $body.familyName.
+
+The person can be contacted by:
+- email: $body.email
+- phone: $body.phone
+
+Summary: $body.summary
+
+Details:
+$body.details
+
 This is an auto generated email. You cannot reply.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-reportincident/src/main/resources/etc/MailBody.vm
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-reportincident/src/main/resources/etc/MailBody.vm 
b/examples/camel-example-reportincident/src/main/resources/etc/MailBody.vm
index f3b0794..3a04f08 100755
--- a/examples/camel-example-reportincident/src/main/resources/etc/MailBody.vm
+++ b/examples/camel-example-reportincident/src/main/resources/etc/MailBody.vm
@@ -1,28 +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.
-## ---------------------------------------------------------------------------
-Incident $body.incidentId has been reported on the $body.incidentDate by 
$body.givenName $body.familyName.
-
-The person can be contacted by:
-- email: $body.email
-- phone: $body.phone
-
-Summary: $body.summary
-
-Details:
-$body.details
-
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+Incident $body.incidentId has been reported on the $body.incidentDate by 
$body.givenName $body.familyName.
+
+The person can be contacted by:
+- email: $body.email
+- phone: $body.phone
+
+Summary: $body.summary
+
+Details:
+$body.details
+
 This is an auto generated email. You cannot reply.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
 
b/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
index c2c41d1..678f83c 100644
--- 
a/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
+++ 
b/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
@@ -22,7 +22,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -74,7 +73,7 @@ public final class CamelClient {
         executors.shutdownNow();
 
         // we're done so let's properly close the application context
-        IOHelper.close(context);
+        context.close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
 
b/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
index a940e6d..3bfb951 100644
--- 
a/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
+++ 
b/examples/camel-example-route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
@@ -18,7 +18,6 @@ package org.apache.camel.example.client;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -49,7 +48,7 @@ public final class CamelFileClient {
         System.out.println("... Wrote " + SIZE + " files");
 
         // we're done so let's properly close the application context
-        IOHelper.close(context);
+        context.close();
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-spring-javaconfig/src/test/java/org/apache/camel/example/spring/javaconfig/IntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-spring-javaconfig/src/test/java/org/apache/camel/example/spring/javaconfig/IntegrationTest.java
 
b/examples/camel-example-spring-javaconfig/src/test/java/org/apache/camel/example/spring/javaconfig/IntegrationTest.java
index 5f35530..77c828a 100644
--- 
a/examples/camel-example-spring-javaconfig/src/test/java/org/apache/camel/example/spring/javaconfig/IntegrationTest.java
+++ 
b/examples/camel-example-spring-javaconfig/src/test/java/org/apache/camel/example/spring/javaconfig/IntegrationTest.java
@@ -18,7 +18,6 @@ package org.apache.camel.example.spring.javaconfig;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.spring.javaconfig.Main;
-import org.apache.camel.util.IOHelper;
 import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.context.support.AbstractApplicationContext;
@@ -46,6 +45,6 @@ public class IntegrationTest extends Assert {
         Thread.sleep(2000);
 
         // we're done so let's properly close the application context
-        IOHelper.close(context);
+        context.close();
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
 
b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
index ff6417a..0df51db 100644
--- 
a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
+++ 
b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
@@ -18,7 +18,6 @@ package org.apache.camel.example.client;
 
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -47,7 +46,7 @@ public final class CamelClient {
         System.out.println("... the result is: " + response);
 
         // we're done so let's properly close the application context
-        IOHelper.close(context);
+        context.close();
     }
     // END SNIPPET: e1
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientEndpoint.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientEndpoint.java
 
b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientEndpoint.java
index a4a4379..2a1b000 100644
--- 
a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientEndpoint.java
+++ 
b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientEndpoint.java
@@ -21,7 +21,6 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Producer;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -74,7 +73,7 @@ public final class CamelClientEndpoint {
         producer.stop();
 
         // we're done so let's properly close the application context
-        IOHelper.close(context);
+        context.close();
     }
     // END SNIPPET: e1
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
 
b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
index dbbb3a7..ac7f4eb 100644
--- 
a/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
+++ 
b/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
@@ -17,7 +17,6 @@
 package org.apache.camel.example.client;
 
 import org.apache.camel.example.server.Multiplier;
-import org.apache.camel.util.IOHelper;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -46,7 +45,7 @@ public final class CamelClientRemoting {
         System.out.println("... the result is: " + response);
 
         // we're done so let's properly close the application context
-        IOHelper.close(context);
+        context.close();
     }
     // END SNIPPET: e1
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesTest.java
----------------------------------------------------------------------
diff --git 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesTest.java
 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesTest.java
index e235667..c36f4ad 100644
--- 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesTest.java
+++ 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesTest.java
@@ -19,7 +19,6 @@ package org.apache.camel.itest.customerrelations;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.camel.util.IOHelper;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxws.EndpointImpl;
@@ -60,7 +59,12 @@ public class CustomerServicesTest extends Assert {
             assertNotNull("We should get Customer here", customer);
         } finally {
             // we're done so let's properly close the application contexts
-            IOHelper.close(clientContext, serverContext);
+            if (clientContext != null) {
+                clientContext.close();
+            }
+            if (serverContext != null) {
+                serverContext.close();
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesWsAddressingTest.java
----------------------------------------------------------------------
diff --git 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesWsAddressingTest.java
 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesWsAddressingTest.java
index 2e4a9f7..9ff77e0 100644
--- 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesWsAddressingTest.java
+++ 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesWsAddressingTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.itest.customerrelations;
 
-import org.apache.camel.util.IOHelper;
 import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -41,7 +40,12 @@ public class CustomerServicesWsAddressingTest extends Assert 
{
             assertNotNull("We should get Customer here", customer);
         } finally {
             // we're done so let's properly close the application context
-            IOHelper.close(clientContext, serverContext);
+            if (clientContext != null) {
+                clientContext.close();
+            }
+            if (serverContext != null) {
+                serverContext.close();
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/tests/test-bundles/mock-javamail_1.7/src/main/resources/META-INF/javamail.default.providers
----------------------------------------------------------------------
diff --git 
a/tests/test-bundles/mock-javamail_1.7/src/main/resources/META-INF/javamail.default.providers
 
b/tests/test-bundles/mock-javamail_1.7/src/main/resources/META-INF/javamail.default.providers
index 0f7d814..965f734 100644
--- 
a/tests/test-bundles/mock-javamail_1.7/src/main/resources/META-INF/javamail.default.providers
+++ 
b/tests/test-bundles/mock-javamail_1.7/src/main/resources/META-INF/javamail.default.providers
@@ -1,22 +1,22 @@
-##
-## 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.
-##
-protocol=smtp; type=transport; class=org.jvnet.mock_javamail.MockTransport; 
vendor=java.net mock-javamail project;
-protocol=pop3; type=store; class=org.jvnet.mock_javamail.MockStore; 
vendor=java.net mock-javamail project;
-protocol=imap; type=store; class=org.jvnet.mock_javamail.MockStore; 
vendor=java.net mock-javamail project;
-
+##
+## 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.
+##
+protocol=smtp; type=transport; class=org.jvnet.mock_javamail.MockTransport; 
vendor=java.net mock-javamail project;
+protocol=pop3; type=store; class=org.jvnet.mock_javamail.MockStore; 
vendor=java.net mock-javamail project;
+protocol=imap; type=store; class=org.jvnet.mock_javamail.MockStore; 
vendor=java.net mock-javamail project;
+

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/tooling/archetypes/camel-archetype-component-scala/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
----------------------------------------------------------------------
diff --git 
a/tooling/archetypes/camel-archetype-component-scala/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
 
b/tooling/archetypes/camel-archetype-component-scala/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
index b842c3d..ff171b5 100644
--- 
a/tooling/archetypes/camel-archetype-component-scala/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
+++ 
b/tooling/archetypes/camel-archetype-component-scala/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
@@ -1,17 +1,17 @@
-## ------------------------------------------------------------------------
-## 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.
-## ------------------------------------------------------------------------
-class=${package}.${name}Component
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+class=${package}.${name}Component

http://git-wip-us.apache.org/repos/asf/camel/blob/d4adc1be/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
----------------------------------------------------------------------
diff --git 
a/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
 
b/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
index b842c3d..ff171b5 100644
--- 
a/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
+++ 
b/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/__scheme__
@@ -1,17 +1,17 @@
-## ------------------------------------------------------------------------
-## 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.
-## ------------------------------------------------------------------------
-class=${package}.${name}Component
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+class=${package}.${name}Component

Reply via email to